Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi Detach previous console device before att...



details:   https://anonhg.NetBSD.org/src/rev/a9b1a6ddccee
branches:  trunk
changeset: 448323:a9b1a6ddccee
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Jan 30 02:44:19 2019 +0000

description:
Detach previous console device before attaching drmfb instead of relying on fdt_remove_bycompat hack

diffstat:

 sys/arch/arm/sunxi/sunxi_drm.c |  11 ++---------
 sys/arch/arm/sunxi/sunxi_fb.c  |   7 +++++--
 2 files changed, 7 insertions(+), 11 deletions(-)

diffs (74 lines):

diff -r 1249e9d57989 -r a9b1a6ddccee sys/arch/arm/sunxi/sunxi_drm.c
--- a/sys/arch/arm/sunxi/sunxi_drm.c    Wed Jan 30 02:43:47 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_drm.c    Wed Jan 30 02:44:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.1 2019/01/30 01:24:00 jmcneill Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.1 2019/01/30 01:24:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -58,11 +58,6 @@
        NULL
 };
 
-static const char * fb_compatible[] = {
-       "allwinner,simple-framebuffer",
-       NULL
-};
-
 static int     sunxi_drm_match(device_t, cfdata_t, void *);
 static void    sunxi_drm_attach(device_t, device_t, void *);
 
@@ -140,8 +135,6 @@
        sc->sc_ddev->dmat = sc->sc_ddev->bus_dmat;
        sc->sc_ddev->dmat_subregion_p = false;
 
-       fdt_remove_bycompat(fb_compatible);
-
        config_defer(self, sunxi_drm_init);
 }
 
diff -r 1249e9d57989 -r a9b1a6ddccee sys/arch/arm/sunxi/sunxi_fb.c
--- a/sys/arch/arm/sunxi/sunxi_fb.c     Wed Jan 30 02:43:47 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_fb.c     Wed Jan 30 02:44:19 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_fb.c,v 1.1 2019/01/30 01:24:00 jmcneill Exp $ */
+/* $NetBSD: sunxi_fb.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015-2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "opt_wsdisplay_compat.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v 1.1 2019/01/30 01:24:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v 1.2 2019/01/30 02:44:19 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -37,6 +37,8 @@
 
 #include <dev/fdt/fdtvar.h>
 
+#include <dev/wscons/wsdisplayvar.h>
+
 #include <drm/drmP.h>
 #include <drm/drmfb.h>
 
@@ -94,6 +96,7 @@
        prop_dictionary_t dict = device_properties(self);
        const bool is_console = true;
        prop_dictionary_set_bool(dict, "is_console", is_console);
+       wsdisplay_cndetach();
 #endif
 
        const struct drmfb_attach_args da = {



Home | Main Index | Thread Index | Old Index