Module Name: src Committed By: jakllsch Date: Thu Jan 16 18:41:10 UTC 2014
Modified Files: src/sys/dev/pci: genfb_pci.c Log Message: Fix PR kern/46376 with Nat Sloss's patch (with slight modification). Serial console now works on x86 with genfb enabled. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/pci/genfb_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/genfb_pci.c diff -u src/sys/dev/pci/genfb_pci.c:1.34 src/sys/dev/pci/genfb_pci.c:1.35 --- src/sys/dev/pci/genfb_pci.c:1.34 Tue Mar 13 18:40:31 2012 +++ src/sys/dev/pci/genfb_pci.c Thu Jan 16 18:41:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_pci.c,v 1.34 2012/03/13 18:40:31 elad Exp $ */ +/* $NetBSD: genfb_pci.c,v 1.35 2014/01/16 18:41:10 jakllsch Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.34 2012/03/13 18:40:31 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb_pci.c,v 1.35 2014/01/16 18:41:10 jakllsch Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,8 +99,10 @@ pci_genfb_attach(device_t parent, device struct pci_genfb_softc *sc = device_private(self); struct pci_attach_args *pa = aux; struct genfb_ops ops; + prop_dictionary_t dict; pcireg_t rom; int idx, bar, type; + bool isconsole; pci_aprint_devinfo(pa, NULL); @@ -185,6 +187,10 @@ pci_genfb_attach(device_t parent, device ops.genfb_mmap = pci_genfb_mmap; ops.genfb_borrow = pci_genfb_borrow; + isconsole = genfb_is_console() != 0; + dict = device_properties(self); + prop_dictionary_set_bool(dict, "is_console", isconsole); + if (genfb_attach(&sc->sc_gen, &ops) == 0) { /* now try to attach a DRM */