Module Name: src
Committed By: macallan
Date: Tue Mar 8 03:16:31 UTC 2011
Modified Files:
src/sys/dev/wsfb: genfb.c
Log Message:
look for a 'virtual_address' property and use it as fb address
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.38 src/sys/dev/wsfb/genfb.c:1.39
--- src/sys/dev/wsfb/genfb.c:1.38 Tue Feb 22 01:26:14 2011
+++ src/sys/dev/wsfb/genfb.c Tue Mar 8 03:16:30 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb.c,v 1.38 2011/02/22 01:26:14 jmcneill Exp $ */
+/* $NetBSD: genfb.c,v 1.39 2011/03/08 03:16:30 macallan Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.38 2011/02/22 01:26:14 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.39 2011/03/08 03:16:30 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -102,7 +102,7 @@
genfb_init(struct genfb_softc *sc)
{
prop_dictionary_t dict;
- uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb;
+ uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb, fbaddr;
uint32_t fboffset;
bool console;
@@ -133,6 +133,11 @@
sc->sc_fboffset = fboffset;
+ sc->sc_fbaddr = NULL;
+ if (prop_dictionary_get_uint64(dict, "virtual_address", &fbaddr)) {
+ sc->sc_fbaddr = (void *)fbaddr;
+ }
+
if (!prop_dictionary_get_uint32(dict, "linebytes", &sc->sc_stride))
sc->sc_stride = (sc->sc_width * sc->sc_depth) >> 3;