Module Name:    src
Committed By:   jmcneill
Date:           Mon Feb  3 16:52:13 UTC 2020

Modified Files:
        src/sys/external/bsd/drm2/nouveau: nouveau_pci.c

Log Message:
Disable simplefb if nouveau attaches


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 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.25 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.26
--- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25	Sat Oct  5 22:37:49 2019
+++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c	Mon Feb  3 16:52:13 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $	*/
+/*	$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $");
+
+#ifdef _KERNEL_OPT
+#if defined(__arm__) || defined(__aarch64__)
+#include "opt_fdt.h"
+#endif
+#endif
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -43,6 +49,10 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci.
 #include <core/device.h>
 #include <core/pci.h>
 
+#ifdef FDT
+#include <dev/fdt/fdtvar.h>
+#endif
+
 #include "nouveau_drm.h"
 #include "nouveau_pci.h"
 
@@ -154,6 +164,15 @@ nouveau_pci_attach(device_t parent, devi
 	sc->sc_dev = NULL;
 	sc->sc_pa = *pa;
 
+#ifdef FDT
+	/*
+	 * XXX Remove the simple framebuffer, assuming that this device
+	 * will take over.
+	 */
+	const char *fb_compatible[] = { "simple-framebuffer", NULL };
+	fdt_remove_bycompat(fb_compatible);
+#endif
+
 	config_mountroot(self, &nouveau_pci_attach_real);
 }
 

Reply via email to