Source-Changes-HG archive

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

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



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

description:
sunxidrm: 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/sunxi/sunxi_drm.c |  9 +++++++--
 sys/arch/arm/sunxi/sunxi_fb.c  |  9 ++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (60 lines):

diff -r ec10e04857e4 -r d0241e190a69 sys/arch/arm/sunxi/sunxi_drm.c
--- a/sys/arch/arm/sunxi/sunxi_drm.c    Sun Sep 25 07:50:15 2022 +0000
+++ b/sys/arch/arm/sunxi/sunxi_drm.c    Sun Sep 25 07:50:23 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_drm.c,v 1.25 2022/06/28 05:19:03 skrll Exp $ */
+/* $NetBSD: sunxi_drm.c,v 1.26 2022/09/25 07:50:23 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.25 2022/06/28 05:19:03 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_drm.c,v 1.26 2022/09/25 07:50:23 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -149,6 +149,11 @@
 
        aprint_normal(": Display Engine Pipeline\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 ec10e04857e4 -r d0241e190a69 sys/arch/arm/sunxi/sunxi_fb.c
--- a/sys/arch/arm/sunxi/sunxi_fb.c     Sun Sep 25 07:50:15 2022 +0000
+++ b/sys/arch/arm/sunxi/sunxi_fb.c     Sun Sep 25 07:50:23 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_fb.c,v 1.7 2021/12/19 12:28:20 riastradh Exp $ */
+/* $NetBSD: sunxi_fb.c,v 1.8 2022/09/25 07:50:23 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: sunxi_fb.c,v 1.7 2021/12/19 12:28:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_fb.c,v 1.8 2022/09/25 07:50:23 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -92,11 +92,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
        sunxi_task_init(&sc->sc_attach_task, &sunxi_fb_init);
        sunxi_task_schedule(parent, &sc->sc_attach_task);
 }



Home | Main Index | Thread Index | Old Index