Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic fix a bunch of bugs & tpyos in chipsfb_mmap() so ...
details: https://anonhg.NetBSD.org/src/rev/ebe09bae956a
branches: trunk
changeset: 347449:ebe09bae956a
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Aug 26 22:50:11 2016 +0000
description:
fix a bunch of bugs & tpyos in chipsfb_mmap() so wsfb can actually work
diffstat:
sys/dev/ic/ct65550.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r abcec2ddb0e5 -r ebe09bae956a sys/dev/ic/ct65550.c
--- a/sys/dev/ic/ct65550.c Fri Aug 26 22:19:48 2016 +0000
+++ b/sys/dev/ic/ct65550.c Fri Aug 26 22:50:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ct65550.c,v 1.10 2014/01/04 16:37:05 macallan Exp $ */
+/* $NetBSD: ct65550.c,v 1.11 2016/08/26 22:50:11 macallan Exp $ */
/*
* Copyright (c) 2006 Michael Lorenz
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.10 2014/01/04 16:37:05 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.11 2016/08/26 22:50:11 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -770,12 +770,14 @@
struct chipsfb_softc *sc = vd->cookie;
paddr_t pa;
- if (sc->sc_mmap != NULL)
- return sc->sc_mmap(v, vs, offset, prot);
+ if (sc->sc_mmap != NULL) {
+ pa = sc->sc_mmap(v, vs, offset, prot);
+ if (pa != -1) return pa;
+ }
/* 'regular' framebuffer mmap()ing */
if (offset < sc->memsize) {
- pa = bus_space_mmap(sc->sc_memt, offset, 0, prot,
+ pa = bus_space_mmap(sc->sc_memt, sc->sc_fb, offset, prot,
BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
return pa;
}
@@ -792,7 +794,7 @@
if ((offset >= sc->sc_fb) && (offset < (sc->sc_fb + sc->sc_fbsize))) {
pa = bus_space_mmap(sc->sc_memt, offset, 0, prot,
- BUS_SPACE_MAP_LINEAR);
+ BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
return pa;
}
Home |
Main Index |
Thread Index |
Old Index