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/nouveau list the PCI ID range for new ...



details:   https://anonhg.NetBSD.org/src/rev/a47fe55c2785
branches:  trunk
changeset: 845549:a47fe55c2785
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Oct 05 22:37:49 2019 +0000

description:
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 19b305df732a -r a47fe55c2785 sys/external/bsd/drm2/nouveau/nouveau_pci.c
--- a/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sat Oct 05 22:21:29 2019 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sat Oct 05 22:37:49 2019 +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.25 2019/10/05 22:37:49 mrg 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.25 2019/10/05 22:37:49 mrg 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