Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Ifdef out Linux PCI atta...



details:   https://anonhg.NetBSD.org/src/rev/9e95702bbbe7
branches:  trunk
changeset: 1028054:9e95702bbbe7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:44:49 2021 +0000

description:
Ifdef out Linux PCI attachment goop; we'll provide our own.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_pci.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 1a68551e9d94 -r 9e95702bbbe7 sys/external/bsd/drm2/dist/drm/i915/i915_pci.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_pci.c    Sun Dec 19 01:44:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_pci.c    Sun Dec 19 01:44:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_pci.c,v 1.3 2021/12/19 01:43:51 riastradh Exp $   */
+/*     $NetBSD: i915_pci.c,v 1.4 2021/12/19 01:44:49 riastradh Exp $   */
 
 /*
  * Copyright © 2016 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.3 2021/12/19 01:43:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci.c,v 1.4 2021/12/19 01:44:49 riastradh Exp $");
 
 #include <linux/console.h>
 #include <linux/vga_switcheroo.h>
@@ -913,6 +913,13 @@
 };
 MODULE_DEVICE_TABLE(pci, pciidlist);
 
+#ifdef __NetBSD__
+
+/* XXX Kludge to expose this to NetBSD driver attachment goop.  */
+const struct pci_device_id *const i915_device_ids = pciidlist;
+const size_t i915_n_device_ids = __arraycount(pciidlist);
+
+#else
 static void i915_pci_remove(struct pci_dev *pdev)
 {
        struct drm_i915_private *i915;
@@ -1084,6 +1091,8 @@
 module_init(i915_init);
 module_exit(i915_exit);
 
+#endif
+
 MODULE_AUTHOR("Tungsten Graphics, Inc.");
 MODULE_AUTHOR("Intel Corporation");
 



Home | Main Index | Thread Index | Old Index