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 occasionally wrong colours in rectangle fills
details: https://anonhg.NetBSD.org/src/rev/a598973e45f6
branches: trunk
changeset: 748583:a598973e45f6
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Oct 28 04:25:13 2009 +0000
description:
fix occasionally wrong colours in rectangle fills
diffstat:
sys/dev/pci/pm2fb.c | 14 ++++++++------
sys/dev/pci/pm2reg.h | 6 +++++-
2 files changed, 13 insertions(+), 7 deletions(-)
diffs (74 lines):
diff -r aadbb382577d -r a598973e45f6 sys/dev/pci/pm2fb.c
--- a/sys/dev/pci/pm2fb.c Wed Oct 28 03:41:30 2009 +0000
+++ b/sys/dev/pci/pm2fb.c Wed Oct 28 04:25:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm2fb.c,v 1.1 2009/10/28 02:10:27 macallan Exp $ */
+/* $NetBSD: pm2fb.c,v 1.2 2009/10/28 04:25:13 macallan Exp $ */
/*
* Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.1 2009/10/28 02:10:27 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.2 2009/10/28 04:25:13 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -600,16 +600,18 @@
{
pm2fb_wait(sc, 6);
+ bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_DDA_MODE,
+ 0);
bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_CONFIG,
PM2RECFG_WRITE_EN);
- bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_CONST_COLOUR,
+ bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_BLOCK_COLOUR,
colour);
bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_RECT_START,
(y << 16) | x);
bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_RECT_SIZE,
(he << 16) | wi);
bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_RENDER,
- PM2RE_RECTANGLE);
+ PM2RE_RECTANGLE | PM2RE_INC_X | PM2RE_INC_Y | PM2RE_FASTFILL);
pm2fb_flush_engine(sc);
}
@@ -620,14 +622,14 @@
{
uint32_t dir = 0;
- pm2fb_wait(sc, 5);
-
if (yd <= ys) {
dir |= PM2RE_INC_Y;
}
if (xd <= xs) {
dir |= PM2RE_INC_X;
}
+ pm2fb_wait(sc, 6);
+ bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_DDA_MODE, 0);
bus_space_write_4(sc->sc_memt, sc->sc_regh, PM2_RE_CONFIG,
PM2RECFG_READ_SRC | PM2RECFG_WRITE_EN | PM2RECFG_ROP_EN |
(rop << 6));
diff -r aadbb382577d -r a598973e45f6 sys/dev/pci/pm2reg.h
--- a/sys/dev/pci/pm2reg.h Wed Oct 28 03:41:30 2009 +0000
+++ b/sys/dev/pci/pm2reg.h Wed Oct 28 04:25:13 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm2reg.h,v 1.1 2009/10/28 02:10:27 macallan Exp $ */
+/* $NetBSD: pm2reg.h,v 1.2 2009/10/28 04:25:13 macallan Exp $ */
/*
* Copyright (c) 2009 Michael Lorenz
@@ -130,4 +130,8 @@
#define PM2_RE_SYNC 0x00008c40
#define PM2_RE_FILTER_MODE 0x00008c00
#define PM2FLT_PASS_SYNC 0x00000400
+#define PM2_RE_DDA_MODE 0x000087e0
+#define PM2DDA_ENABLE 0x00000001
+#define PM2DDA_GORAUD 0x00000002 /* flat otherwise */
+#define PM2_RE_BLOCK_COLOUR 0x00008ac8
#endif /* PM2_REG_H */
Home |
Main Index |
Thread Index |
Old Index