Module Name: src Committed By: riastradh Date: Sun Sep 25 07:50:32 UTC 2022
Modified Files: src/sys/arch/arm/ti: ti_fb.c ti_lcdc.c Log Message: tilcdc(4): 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.3 -r1.4 src/sys/arch/arm/ti/ti_fb.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/ti/ti_lcdc.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/ti/ti_fb.c diff -u src/sys/arch/arm/ti/ti_fb.c:1.3 src/sys/arch/arm/ti/ti_fb.c:1.4 --- src/sys/arch/arm/ti/ti_fb.c:1.3 Sun Dec 19 12:44:57 2021 +++ src/sys/arch/arm/ti/ti_fb.c Sun Sep 25 07:50:32 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_fb.c,v 1.3 2021/12/19 12:44:57 riastradh Exp $ */ +/* $NetBSD: ti_fb.c,v 1.4 2022/09/25 07:50:32 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: ti_fb.c,v 1.3 2021/12/19 12:44:57 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_fb.c,v 1.4 2022/09/25 07:50:32 riastradh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -100,13 +100,6 @@ tilcdc_fb_init(struct tilcdc_drm_task *t sc_attach_task); device_t self = sc->sc_dev; struct tilcdcfb_attach_args * const tfa = &sc->sc_tfa; - -#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 - const struct drmfb_attach_args da = { .da_dev = self, .da_fb_helper = tfa->tfa_fb_helper, Index: src/sys/arch/arm/ti/ti_lcdc.c diff -u src/sys/arch/arm/ti/ti_lcdc.c:1.13 src/sys/arch/arm/ti/ti_lcdc.c:1.14 --- src/sys/arch/arm/ti/ti_lcdc.c:1.13 Sat Jul 2 05:04:36 2022 +++ src/sys/arch/arm/ti/ti_lcdc.c Sun Sep 25 07:50:32 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: ti_lcdc.c,v 1.13 2022/07/02 05:04:36 skrll Exp $ */ +/* $NetBSD: ti_lcdc.c,v 1.14 2022/09/25 07:50:32 riastradh Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.13 2022/07/02 05:04:36 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ti_lcdc.c,v 1.14 2022/09/25 07:50:32 riastradh Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -392,6 +392,11 @@ tilcdc_attach(device_t parent, device_t return; } +#ifdef WSDISPLAY_MULTICONS + const bool is_console = true; + prop_dictionary_set_bool(dict, "is_console", is_console); +#endif + if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0) { aprint_error(": couldn't get registers\n"); return;