Module Name: src Committed By: martin Date: Mon Dec 1 13:30:37 UTC 2014
Modified Files: src/sys/arch/arm/allwinner [netbsd-7]: awin_fb.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #285): sys/arch/arm/allwinner/awin_fb.c: revision 1.8 make the full amount of reserved video memory available to userland To generate a diff of this commit: cvs rdiff -u -r1.4.2.5 -r1.4.2.6 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.4.2.5 src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.6 --- src/sys/arch/arm/allwinner/awin_fb.c:1.4.2.5 Mon Dec 1 13:23:49 2014 +++ src/sys/arch/arm/allwinner/awin_fb.c Mon Dec 1 13:30:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: awin_fb.c,v 1.4.2.5 2014/12/01 13:23:49 martin Exp $ */ +/* $NetBSD: awin_fb.c,v 1.4.2.6 2014/12/01 13:30:37 martin Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill <jmcne...@invisible.ca> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: awin_fb.c,v 1.4.2.5 2014/12/01 13:23:49 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awin_fb.c,v 1.4.2.6 2014/12/01 13:30:37 martin 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,