Module Name: src
Committed By: jmcneill
Date: Sun Nov 30 20:25:54 UTC 2014
Modified Files:
src/sys/arch/arm/allwinner: awin_fb.c
Log Message:
make the full amount of reserved video memory available to userland
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/allwinner/awin_fb.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/arch/arm/allwinner/awin_fb.c
diff -u src/sys/arch/arm/allwinner/awin_fb.c:1.7 src/sys/arch/arm/allwinner/awin_fb.c:1.8
--- src/sys/arch/arm/allwinner/awin_fb.c:1.7 Sun Nov 30 19:15:53 2014
+++ src/sys/arch/arm/allwinner/awin_fb.c Sun Nov 30 20:25:54 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_fb.c,v 1.7 2014/11/30 19:15:53 jmcneill Exp $ */
+/* $NetBSD: awin_fb.c,v 1.8 2014/11/30 20:25:54 jmcneill Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awin_fb.c,v 1.7 2014/11/30 19:15:53 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awin_fb.c,v 1.8 2014/11/30 20:25:54 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -143,8 +143,10 @@ awin_fb_ioctl(void *v, void *vs, u_long
fbi = data;
ri = &sc->sc_gen.vd.active->scr_ri;
error = wsdisplayio_get_fbinfo(ri, fbi);
- if (error == 0)
+ if (error == 0) {
fbi->fbi_flags |= WSFB_VRAM_IS_RAM;
+ fbi->fbi_fbsize = sc->sc_dmasegs[0].ds_len;
+ }
return error;
case WSDISPLAYIO_SVIDEO:
case WSDISPLAYIO_GVIDEO:
@@ -163,7 +165,7 @@ awin_fb_mmap(void *v, void *vs, off_t of
{
struct awin_fb_softc *sc = v;
- if (off < 0 || off >= sc->sc_gen.sc_fbsize)
+ if (off < 0 || off >= sc->sc_dmasegs[0].ds_len)
return -1;
return bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmasegs, sc->sc_ndmasegs,