Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/fdt Add support for WSDISPLAY_MULTICONS



details:   https://anonhg.NetBSD.org/src/rev/3689096822ec
branches:  trunk
changeset: 457859:3689096822ec
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Jul 23 12:34:05 2019 +0000

description:
Add support for WSDISPLAY_MULTICONS

diffstat:

 sys/arch/arm/fdt/plfb_fdt.c |  27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diffs (62 lines):

diff -r d7254bd53411 -r 3689096822ec sys/arch/arm/fdt/plfb_fdt.c
--- a/sys/arch/arm/fdt/plfb_fdt.c       Tue Jul 23 12:32:40 2019 +0000
+++ b/sys/arch/arm/fdt/plfb_fdt.c       Tue Jul 23 12:34:05 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plfb_fdt.c,v 1.3 2019/07/06 15:53:38 jmcneill Exp $ */
+/* $NetBSD: plfb_fdt.c,v 1.4 2019/07/23 12:34:05 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -30,8 +30,10 @@
  * ARM PrimeCell PL111 framebuffer console driver
  */
 
+#include "opt_wsdisplay_compat.h"
+
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plfb_fdt.c,v 1.3 2019/07/06 15:53:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plfb_fdt.c,v 1.4 2019/07/23 12:34:05 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -171,15 +173,27 @@
 
        plfb_init(sc);
 
+       aprint_naive("\n");
+       aprint_normal("\n");
+
        sc->sc_wstype = WSDISPLAY_TYPE_PLFB;
-       prop_dictionary_set_bool(dict, "is_console",
-           phandle == plfb_console_phandle);
+
+#ifdef WSDISPLAY_MULTICONS
+       const bool is_console = true;
+       genfb_cnattach();
+#else
+       const bool is_console = phandle == plfb_console_phandle;
+       if (is_console)
+               aprint_normal_dev(self, "switching to framebuffer console\n");
+#endif
+
+       prop_dictionary_set_bool(dict, "is_console", is_console);
 
        genfb_init(&sc->sc_gen);
 
        if (sc->sc_gen.sc_width == 0 ||
            sc->sc_gen.sc_fbsize == 0) {
-               aprint_normal(": disabled\n");
+               aprint_normal_dev(self, "disabled\n");
                return;
        }
 
@@ -189,9 +203,6 @@
        ops.genfb_ioctl = plfb_ioctl;
        ops.genfb_mmap = plfb_mmap;
 
-       aprint_naive("\n");
-       aprint_normal("\n");
-
        genfb_attach(&sc->sc_gen, &ops);
 }
 



Home | Main Index | Thread Index | Old Index