Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/rockchip rkdrm: Set is_console on the drm devic...



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

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

diffstat:

 sys/arch/arm/rockchip/rk_drm.c |   9 +++++++--
 sys/arch/arm/rockchip/rk_fb.c  |  10 ++--------
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (61 lines):

diff -r 3232efb6bf17 -r ec10e04857e4 sys/arch/arm/rockchip/rk_drm.c
--- a/sys/arch/arm/rockchip/rk_drm.c    Sun Sep 25 07:23:07 2022 +0000
+++ b/sys/arch/arm/rockchip/rk_drm.c    Sun Sep 25 07:50:15 2022 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
 
        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;
diff -r 3232efb6bf17 -r ec10e04857e4 sys/arch/arm/rockchip/rk_fb.c
--- a/sys/arch/arm/rockchip/rk_fb.c     Sun Sep 25 07:23:07 2022 +0000
+++ b/sys/arch/arm/rockchip/rk_fb.c     Sun Sep 25 07:50:15 2022 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        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);
 }



Home | Main Index | Thread Index | Old Index