Module Name: src
Committed By: macallan
Date: Tue Aug 30 02:53:02 UTC 2011
Modified Files:
src/sys/dev/pci: voyagerfb.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/voyagerfb.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/dev/pci/voyagerfb.c
diff -u src/sys/dev/pci/voyagerfb.c:1.8 src/sys/dev/pci/voyagerfb.c:1.9
--- src/sys/dev/pci/voyagerfb.c:1.8 Tue Aug 30 01:21:03 2011
+++ src/sys/dev/pci/voyagerfb.c Tue Aug 30 02:53:01 2011
@@ -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);