Module Name:    src
Committed By:   nonaka
Date:           Mon Feb 27 23:52:06 UTC 2017

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm: drmP.h
        src/sys/external/bsd/drm2/pci: drm_pci.c

Log Message:
Revert "drmkms_pci: use MSI if available."

Fix PR/51997.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/pci/drm_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.12 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.13
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.12	Tue Feb 21 14:19:39 2017
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Mon Feb 27 23:52:05 2017
@@ -1268,7 +1268,6 @@ struct drm_device {
 	bool irq_enabled;		/**< True if irq handler is enabled */
 #ifdef __NetBSD__
 	struct drm_bus_irq_cookie *irq_cookie;
-	pci_intr_handle_t *intr_handles;
 #endif
 	__volatile__ long context_flag;	/**< Context swapping flag */
 	int last_context;		/**< Last current context */

Index: src/sys/external/bsd/drm2/pci/drm_pci.c
diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.14 src/sys/external/bsd/drm2/pci/drm_pci.c:1.15
--- src/sys/external/bsd/drm2/pci/drm_pci.c:1.14	Tue Feb 21 14:19:40 2017
+++ src/sys/external/bsd/drm2/pci/drm_pci.c	Mon Feb 27 23:52:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_pci.c,v 1.14 2017/02/21 14:19:40 nonaka Exp $	*/
+/*	$NetBSD: drm_pci.c,v 1.15 2017/02/27 23:52:05 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.14 2017/02/21 14:19:40 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.15 2017/02/27 23:52:05 nonaka Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -232,17 +232,16 @@ drm_pci_irq_install(struct drm_device *d
     struct drm_bus_irq_cookie **cookiep)
 {
 	const struct pci_attach_args *const pa = drm_pci_attach_args(dev);
+	pci_intr_handle_t ih;
 	const char *intrstr;
 	void *ih_cookie;
 	char intrbuf[PCI_INTRSTR_LEN];
 
-	if (pci_intr_alloc(pa, &dev->intr_handles, NULL, 0))
+	if (pci_intr_map(pa, &ih))
 		return -ENOENT;
 
-	intrstr = pci_intr_string(pa->pa_pc, dev->intr_handles[0], intrbuf,
-	    sizeof(intrbuf));
-	ih_cookie = pci_intr_establish(pa->pa_pc, dev->intr_handles[0],
-	    IPL_DRM, handler, arg);
+	intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
+	ih_cookie = pci_intr_establish(pa->pa_pc, ih, IPL_DRM, handler, arg);
 	if (ih_cookie == NULL) {
 		aprint_error_dev(dev->dev,
 		    "couldn't establish interrupt at %s (%s)\n",
@@ -263,7 +262,6 @@ drm_pci_irq_uninstall(struct drm_device 
 	const struct pci_attach_args *pa = drm_pci_attach_args(dev);
 
 	pci_intr_disestablish(pa->pa_pc, (void *)cookie);
-	pci_intr_release(pa->pa_pc, dev->intr_handles, 1);
 }
 
 static const char *

Reply via email to