From 517dc97c4b4e4c1cb61b3262709043a3708c4291 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Mon, 18 Dec 2017 19:06:32 +0000 Subject: [PATCH] Always set "is_console" property to true when WSDISPLAY_MULTICONS is defined --- sys/dev/fdt/simplefb.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/fdt/simplefb.c b/sys/dev/fdt/simplefb.c index aad8deab662b..41cf105a696f 100644 --- a/sys/dev/fdt/simplefb.c +++ b/sys/dev/fdt/simplefb.c @@ -1,4 +1,4 @@ -/* $NetBSD: simplefb.c,v 1.2 2017/09/04 18:01:28 jmcneill Exp $ */ +/* $NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -26,8 +26,10 @@ * SUCH DAMAGE. */ +#include "opt_wsdisplay_compat.h" + #include -__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.2 2017/09/04 18:01:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $"); #include #include @@ -177,13 +179,16 @@ simplefb_attach_genfb(struct simplefb_softc *sc) ops.genfb_ioctl = simplefb_ioctl; ops.genfb_mmap = simplefb_mmap; +#ifdef WSDISPLAY_MULTICONS + const bool is_console = true; +#else const bool is_console = phandle == simplefb_console_phandle; - - prop_dictionary_set_bool(dict, "is_console", is_console); - if (is_console) aprint_normal_dev(sc->sc_gen.sc_dev, "switching to framebuffer console\n"); +#endif + + prop_dictionary_set_bool(dict, "is_console", is_console); genfb_attach(&sc->sc_gen, &ops);