Module Name: src Committed By: riastradh Date: Sun Sep 25 07:50:15 UTC 2022
Modified Files: src/sys/arch/arm/rockchip: rk_drm.c rk_fb.c Log Message: rkdrm: Set is_console on the drm device, not the fb child. The drm device is represented by a rockchip,display-subsystem node in the device tree. The fb child is a purely software abstraction used by drm. The is_console property is used by MD firmware logic to mark which actual device in hardware bus enumeration like PCI or FDT the system has chosen for the console early at boot, so hanging it on the node for the real hardware device makes more sense than hanging it on the software abstraction, and is consistent with recent changes to drmfb to respect its setting on other platforms for hardware devices. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/rockchip/rk_drm.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/rockchip/rk_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/rockchip/rk_drm.c diff -u src/sys/arch/arm/rockchip/rk_drm.c:1.19 src/sys/arch/arm/rockchip/rk_drm.c:1.20 --- src/sys/arch/arm/rockchip/rk_drm.c:1.19 Thu Apr 21 21:22:25 2022 +++ src/sys/arch/arm/rockchip/rk_drm.c Sun Sep 25 07:50:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_drm.c,v 1.19 2022/04/21 21:22:25 andvar Exp $ */ +/* $NetBSD: rk_drm.c,v 1.20 2022/09/25 07:50:15 riastradh Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rk_drm.c,v 1.19 2022/04/21 21:22:25 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_drm.c,v 1.20 2022/09/25 07:50:15 riastradh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -133,6 +133,11 @@ rk_drm_attach(device_t parent, device_t aprint_normal("\n"); +#ifdef WSDISPLAY_MULTICONS + const bool is_console = true; + prop_dictionary_set_bool(dict, "is_console", is_console); +#endif + sc->sc_dev = self; sc->sc_dmat = faa->faa_dmat; sc->sc_bst = faa->faa_bst; Index: src/sys/arch/arm/rockchip/rk_fb.c diff -u src/sys/arch/arm/rockchip/rk_fb.c:1.6 src/sys/arch/arm/rockchip/rk_fb.c:1.7 --- src/sys/arch/arm/rockchip/rk_fb.c:1.6 Sun Dec 19 12:45:19 2021 +++ src/sys/arch/arm/rockchip/rk_fb.c Sun Sep 25 07:50:15 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_fb.c,v 1.6 2021/12/19 12:45:19 riastradh Exp $ */ +/* $NetBSD: rk_fb.c,v 1.7 2022/09/25 07:50:15 riastradh 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: rk_fb.c,v 1.6 2021/12/19 12:45:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_fb.c,v 1.7 2022/09/25 07:50:15 riastradh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -88,12 +88,6 @@ rk_fb_attach(device_t parent, device_t s aprint_naive("\n"); aprint_normal("\n"); -#ifdef WSDISPLAY_MULTICONS - prop_dictionary_t dict = device_properties(self); - const bool is_console = true; - prop_dictionary_set_bool(dict, "is_console", is_console); -#endif - rk_task_init(&sc->sc_attach_task, &rk_fb_init); rk_task_schedule(parent, &sc->sc_attach_task); }