Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/ti tilcdc(4): Set is_console on the drm device,...



details:   https://anonhg.NetBSD.org/src/rev/d6c3c3efd726
branches:  trunk
changeset: 370714:d6c3c3efd726
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Sep 25 07:50:32 2022 +0000

description:
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.

diffstat:

 sys/arch/arm/ti/ti_fb.c   |  11 ++---------
 sys/arch/arm/ti/ti_lcdc.c |   9 +++++++--
 2 files changed, 9 insertions(+), 11 deletions(-)

diffs (62 lines):

diff -r d0241e190a69 -r d6c3c3efd726 sys/arch/arm/ti/ti_fb.c
--- a/sys/arch/arm/ti/ti_fb.c   Sun Sep 25 07:50:23 2022 +0000
+++ b/sys/arch/arm/ti/ti_fb.c   Sun Sep 25 07:50:32 2022 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
            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,
diff -r d0241e190a69 -r d6c3c3efd726 sys/arch/arm/ti/ti_lcdc.c
--- a/sys/arch/arm/ti/ti_lcdc.c Sun Sep 25 07:50:23 2022 +0000
+++ b/sys/arch/arm/ti/ti_lcdc.c Sun Sep 25 07:50:32 2022 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index