Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/external/bsd/drm2/nouveau Pull up following revision(...
details: https://anonhg.NetBSD.org/src/rev/22820f8c9e8e
branches: netbsd-8
changeset: 319724:22820f8c9e8e
user: martin <martin%NetBSD.org@localhost>
date: Fri Jun 08 10:08:06 2018 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #851):
sys/external/bsd/drm2/nouveau/nouveau_pci.c: revision 1.9-1.11
disable drm2 on modern nouveau cards (Pascal-based).
our older drm doesn't have any support for modern Pascal or
the second version of Maxwell (but not disabled here yet)
but the driver tries to attach on any nvidia gpu.
this should workaround PR#53258, and other issues reported
with modern nvidia chipsets.
XXX: pullup-7, pullup-8.
-
disable matching nouveau on pascal and the second generation of maxwell
cards that are not supported by this version of drm.
this should fix various modern systems vs nvidia issues, eg PR 53188.
XXX: pullup-7, pullup-8.
-
the previous change doubled the check for pascal. fix it so
that we only check for later maxwell and pascal once each,
as intended.
diffstat:
sys/external/bsd/drm2/nouveau/nouveau_pci.c | 34 +++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 2 deletions(-)
diffs (55 lines):
diff -r 2d7f966b42d3 -r 22820f8c9e8e sys/external/bsd/drm2/nouveau/nouveau_pci.c
--- a/sys/external/bsd/drm2/nouveau/nouveau_pci.c Fri Jun 08 10:02:59 2018 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau_pci.c Fri Jun 08 10:08:06 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_pci.c,v 1.8 2016/04/19 06:57:37 mrg Exp $ */
+/* $NetBSD: nouveau_pci.c,v 1.8.10.1 2018/06/08 10:08:06 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.8 2016/04/19 06:57:37 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.8.10.1 2018/06/08 10:08:06 martin Exp $");
#include <sys/types.h>
#include <sys/device.h>
@@ -91,6 +91,36 @@
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 needs missing-so-far firmware for Maxwell-based cards:
+ * 0x1380-0x13bf GM107
+ */
+ if (IS_BETWEEN(0x1380, 0x13bf))
+ return 0;
+
+ /*
+ * NetBSD drm2 doesn't support Pascal-based cards:
+ * 0x1580-0x15ff GP100
+ * 0x1b00-0x1b7f GP102
+ * 0x1b80-0x1bff GP104
+ * 0x1c00-0x1c7f GP106
+ * 0x1c80-0x1cff GP107
+ * 0x1d00-0x1d7f GP108
+ * 0x1d80-0x1dff GV100
+ */
+
+ 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))
+ return 0;
+#undef IS_BETWEEN
+
return 6; /* XXX Beat genfb_pci... */
}
Home |
Main Index |
Thread Index |
Old Index