Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci fix downward scrolling, set BUS_SPACE_MAP_PREFET...



details:   https://anonhg.NetBSD.org/src/rev/6a628f87c71d
branches:  trunk
changeset: 819480:6a628f87c71d
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Dec 07 15:50:30 2016 +0000

description:
fix downward scrolling, set BUS_SPACE_MAP_PREFETCHABLE

diffstat:

 sys/dev/pci/pm3fb.c |  17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diffs (41 lines):

diff -r cba8df9881e8 -r 6a628f87c71d sys/dev/pci/pm3fb.c
--- a/sys/dev/pci/pm3fb.c       Wed Dec 07 15:00:46 2016 +0000
+++ b/sys/dev/pci/pm3fb.c       Wed Dec 07 15:50:30 2016 +0000
@@ -427,7 +427,7 @@
        /* 'regular' framebuffer mmap()ing */
        if (offset < sc->sc_fbsize) {
                pa = bus_space_mmap(sc->sc_memt, sc->sc_fb + offset, 0, prot,
-                   BUS_SPACE_MAP_LINEAR);
+                   BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE);
                return pa;
        }
 
@@ -445,7 +445,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;
        }
 
@@ -713,17 +713,8 @@
        int x_align,  offset_x, offset_y; 
        uint32_t dir = 0;
 
-       if (srcx > dstx) {
-               offset_x = srcx - dstx;
-       } else {
-               offset_x = dstx - srcx;
-       }
-
-       if (srcy > dsty) {
-               offset_y = srcy - dsty;
-       } else {
-               offset_y = dsty - srcy;
-       }
+       offset_x = srcx - dstx;
+       offset_y = srcy - dsty;
 
        if (dsty <= srcy) {
                dir |= PM3_RENDER2D_YPOSITIVE;



Home | Main Index | Thread Index | Old Index