Module Name: src Committed By: jmcneill Date: Wed Jan 30 02:44:20 UTC 2019
Modified Files: src/sys/arch/arm/sunxi: sunxi_drm.c sunxi_fb.c Log Message: Detach previous console device before attaching drmfb instead of relying on fdt_remove_bycompat hack To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_drm.c \ src/sys/arch/arm/sunxi/sunxi_fb.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/arch/arm/sunxi/sunxi_drm.c diff -u src/sys/arch/arm/sunxi/sunxi_drm.c:1.1 src/sys/arch/arm/sunxi/sunxi_drm.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_drm.c:1.1 Wed Jan 30 01:24:00 2019 +++ src/sys/arch/arm/sunxi/sunxi_drm.c Wed Jan 30 02:44:19 2019 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ static const char * const compatible[] = 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 @@ sunxi_drm_attach(device_t parent, device 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); } Index: src/sys/arch/arm/sunxi/sunxi_fb.c diff -u src/sys/arch/arm/sunxi/sunxi_fb.c:1.1 src/sys/arch/arm/sunxi/sunxi_fb.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_fb.c:1.1 Wed Jan 30 01:24:00 2019 +++ src/sys/arch/arm/sunxi/sunxi_fb.c Wed Jan 30 02:44:19 2019 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v #include <dev/fdt/fdtvar.h> +#include <dev/wscons/wsdisplayvar.h> + #include <drm/drmP.h> #include <drm/drmfb.h> @@ -94,6 +96,7 @@ sunxi_fb_attach(device_t parent, device_ 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 = {