Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/voyager some trivial fixes:



details:   https://anonhg.NetBSD.org/src/rev/ca1f3dd555e2
branches:  trunk
changeset: 342891:ca1f3dd555e2
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Jan 13 15:56:05 2016 +0000

description:
some trivial fixes:
- rearrange dmesg output so all values are printed properly
- use aprint_*
- support WSDISPLAYIO_GET_FBINFO

diffstat:

 sys/dev/pci/voyager/voyagerfb.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 414e740ce189 -r ca1f3dd555e2 sys/dev/pci/voyager/voyagerfb.c
--- a/sys/dev/pci/voyager/voyagerfb.c   Wed Jan 13 13:29:51 2016 +0000
+++ b/sys/dev/pci/voyager/voyagerfb.c   Wed Jan 13 15:56:05 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $       */
+/*     $NetBSD: voyagerfb.c,v 1.28 2016/01/13 15:56:05 macallan Exp $  */
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.27 2014/03/11 08:19:45 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.28 2016/01/13 15:56:05 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -269,19 +269,19 @@
        sc->sc_depth = 8;
 #endif
 
-       printf("%s: %d x %d, %d bit, stride %d\n", device_xname(self), 
-               sc->sc_width, sc->sc_height, sc->sc_depth, sc->sc_stride);
-
        /*
         * XXX yeah, casting the fb address to uint32_t is formally wrong
         * but as far as I know there are no SM502 with 64bit BARs
         */
-       aprint_normal("%s: %d MB video memory at 0x%08x\n", device_xname(self),
+       aprint_normal_dev(self, "%d MB video memory at 0x%08x\n",
            (int)(sc->sc_fbsize >> 20), (uint32_t)sc->sc_fb);
 
        /* init engine here */
        voyagerfb_init(sc);
 
+       aprint_normal_dev(self, "%d x %d, %d bit, stride %d\n", 
+               sc->sc_width, sc->sc_height, sc->sc_depth, sc->sc_stride);
+
        sc->sc_defaultscreen_descr = (struct wsscreen_descr){
                "default",
                0, 0,
@@ -515,6 +515,12 @@
                        cu = (struct wsdisplay_cursor *)data;
                        return voyagerfb_scursor(sc, cu);
                }
+
+       case WSDISPLAYIO_GET_FBINFO:
+               {
+                       struct wsdisplayio_fbinfo *fbi = data;
+                       return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+               }
        }
        return EPASSTHROUGH;
 }



Home | Main Index | Thread Index | Old Index