Module Name: src Committed By: macallan Date: Wed Nov 23 21:18:12 UTC 2016
Modified Files: src/sys/arch/sparc64/dev: gfb.c Log Message: support WSDISPLAYIO_GET_FBINFO also, use _PREFETCHABLE for rasops To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/gfb.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/sparc64/dev/gfb.c diff -u src/sys/arch/sparc64/dev/gfb.c:1.8 src/sys/arch/sparc64/dev/gfb.c:1.9 --- src/sys/arch/sparc64/dev/gfb.c:1.8 Thu Jul 7 06:55:38 2016 +++ src/sys/arch/sparc64/dev/gfb.c Wed Nov 23 21:18:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: gfb.c,v 1.8 2016/07/07 06:55:38 msaitoh Exp $ */ +/* $NetBSD: gfb.c,v 1.9 2016/11/23 21:18:12 macallan Exp $ */ /* * Copyright (c) 2009 Michael Lorenz @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.8 2016/07/07 06:55:38 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.9 2016/11/23 21:18:12 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -162,7 +162,8 @@ gfb_attach(device_t parent, device_t sel sc->sc_mode = WSDISPLAYIO_MODE_EMUL; if (bus_space_map(sc->sc_memt, ma->ma_reg[6].ur_paddr, - sc->sc_fblen, BUS_SPACE_MAP_LINEAR, &sc->sc_fbh)) { + sc->sc_fblen, BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, + &sc->sc_fbh)) { printf(": failed to map the framebuffer\n"); return; } @@ -303,6 +304,11 @@ gfb_ioctl(void *v, void *vs, u_long cmd, } } return 0; + case WSDISPLAYIO_GET_FBINFO: + { + struct wsdisplayio_fbinfo *fbi = data; + return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi); + } } return EPASSTHROUGH; } @@ -316,6 +322,11 @@ gfb_mmap(void *v, void *vs, off_t offset /* 'regular' framebuffer mmap()ing */ if (offset < sc->sc_fblen) { + /* + * XXX + * BUS_SPACE_MAP_PREFETCHABLE produces artifacts with X, but + * not with the console code, so don't set it here + */ pa = bus_space_mmap(sc->sc_memt, sc->sc_fb_paddr + offset, 0, prot, BUS_SPACE_MAP_LINEAR); return pa;