Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix PR kern/46376 with Nat Sloss's patch (with s...



details:   https://anonhg.NetBSD.org/src/rev/1775a9798009
branches:  trunk
changeset: 326042:1775a9798009
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Jan 16 18:41:10 2014 +0000

description:
Fix PR kern/46376 with Nat Sloss's patch (with slight modification).
Serial console now works on x86 with genfb enabled.

diffstat:

 sys/dev/pci/genfb_pci.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r dcbaff76d4f8 -r 1775a9798009 sys/dev/pci/genfb_pci.c
--- a/sys/dev/pci/genfb_pci.c   Thu Jan 16 18:09:55 2014 +0000
+++ b/sys/dev/pci/genfb_pci.c   Thu Jan 16 18:41:10 2014 +0000
@@ -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 @@
        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 @@
        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 */



Home | Main Index | Thread Index | Old Index