Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci contrary to the manual the right-to-left flag al...



details:   https://anonhg.NetBSD.org/src/rev/fe3ba8c2b86e
branches:  trunk
changeset: 768994:fe3ba8c2b86e
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Aug 30 02:53:01 2011 +0000

description:
contrary to the manual the right-to-left flag also causes the blitter to
work bottom-to-top
Now all copy*() methods should work properly in all directions.

diffstat:

 sys/dev/pci/voyagerfb.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r d87751b56a24 -r fe3ba8c2b86e sys/dev/pci/voyagerfb.c
--- a/sys/dev/pci/voyagerfb.c   Tue Aug 30 01:21:03 2011 +0000
+++ b/sys/dev/pci/voyagerfb.c   Tue Aug 30 02:53:01 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.8 2011/08/30 01:21:03 macallan Exp $   */
+/*     $NetBSD: voyagerfb.c,v 1.9 2011/08/30 02:53:01 macallan Exp $   */
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.8 2011/08/30 01:21:03 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.9 2011/08/30 02:53:01 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -601,9 +601,16 @@
        if (xd <= xs) {
                /* left to right */
        } else {
+               /*
+                * According to the manual this flag reverses only the blitter's
+                * X direction. At least on my Gdium it also reverses the Y
+                * direction
+                */ 
                cmd |= SM502_CTRL_R_TO_L;
-               xs += he - 1;
+               xs += wi - 1;
                xd += wi - 1;
+               ys += he - 1;
+               yd += he - 1;
        }
        
        bus_space_write_4(sc->sc_memt, sc->sc_regh, SM502_CONTROL, cmd);



Home | Main Index | Thread Index | Old Index