Module Name: src Committed By: macallan Date: Wed Jan 13 15:56:05 UTC 2016
Modified Files: src/sys/dev/pci/voyager: voyagerfb.c Log Message: some trivial fixes: - rearrange dmesg output so all values are printed properly - use aprint_* - support WSDISPLAYIO_GET_FBINFO To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pci/voyager/voyagerfb.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/voyager/voyagerfb.c diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.27 src/sys/dev/pci/voyager/voyagerfb.c:1.28 --- src/sys/dev/pci/voyager/voyagerfb.c:1.27 Tue Mar 11 08:19:45 2014 +++ src/sys/dev/pci/voyager/voyagerfb.c Wed Jan 13 15:56:05 2016 @@ -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 @@ voyagerfb_attach(device_t parent, device 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 @@ voyagerfb_ioctl(void *v, void *vs, u_lon 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; }