Module Name: src Committed By: mrg Date: Sat Oct 5 22:37:50 UTC 2019
Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/drm2/nouveau/nouveau_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/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.24 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.24 Wed Jul 3 20:47:22 2019 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sat Oct 5 22:37:49 2019 @@ -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 @@ nouveau_pci_match(device_t parent, cfdat 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 @@ nouveau_pci_match(device_t parent, cfdat * 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",