Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/external/bsd/drm2/nouveau Pull up following revision(...



details:   https://anonhg.NetBSD.org/src/rev/3a8d0adb6701
branches:  netbsd-9
changeset: 745403:3a8d0adb6701
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Mar 01 12:50:42 2020 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #749):

        sys/external/bsd/drm2/nouveau/nouveau_pci.c: revision 1.25

list the PCI ID range for new nvidia TU117 and TU116.

adjust the check to simply be >= 0x1580, which is the
first pciid not support.

should fix PR#54600.

diffstat:

 sys/external/bsd/drm2/nouveau/nouveau_pci.c |  26 ++++++++++----------------
 1 files changed, 10 insertions(+), 16 deletions(-)

diffs (56 lines):

diff -r 9a1b9329c61e -r 3a8d0adb6701 sys/external/bsd/drm2/nouveau/nouveau_pci.c
--- a/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sun Mar 01 12:48:25 2020 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sun Mar 01 12:50:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $     */
+/*     $NetBSD: nouveau_pci.c,v 1.24.2.1 2020/03/01 12:50:42 martin Exp $      */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.24.2.1 2020/03/01 12:50:42 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -97,8 +97,6 @@
        if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY)
                return 0;
 
-#define IS_BETWEEN(x,y) \
-       (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y))
        /*
         * NetBSD drm2 doesn't support Pascal, Volta or Turing based cards:
         *   0x1580-0x15ff      GP100
@@ -111,20 +109,16 @@
         *   0x1e00-0x1e7f      TU102
         *   0x1e80-0x1eff      TU104
         *   0x1f00-0x1f7f      TU106
+        *   0x1f80-0x1fff      TU117
+        *   0x2180-0x21ff      TU116
+        *
+        * reduce this to >= 1580, so that new chipsets not explictly
+        * listed above will be picked up.
+        *
+        * XXX perhaps switch this to explicitly match known list.
         */
-
-       if (IS_BETWEEN(0x1580, 0x15ff) ||
-           IS_BETWEEN(0x1b00, 0x1b7f) ||
-           IS_BETWEEN(0x1b80, 0x1bff) ||
-           IS_BETWEEN(0x1c00, 0x1c7f) ||
-           IS_BETWEEN(0x1c80, 0x1cff) ||
-           IS_BETWEEN(0x1d00, 0x1d7f) ||
-           IS_BETWEEN(0x1d80, 0x1dff) ||
-           IS_BETWEEN(0x1e00, 0x1e7f) ||
-           IS_BETWEEN(0x1e80, 0x1eff) ||
-           IS_BETWEEN(0x1f00, 0x1f7f))
+       if (PCI_PRODUCT(pa->pa_id) >= 0x1580)
                return 0;
-#undef IS_BETWEEN
 
        linux_pci_dev_init(&pdev, parent /* XXX bogus */, parent, pa, 0);
        ret = nvkm_device_pci_new(&pdev, NULL, "error",



Home | Main Index | Thread Index | Old Index