Module Name: src Committed By: macallan Date: Tue Feb 28 21:22:21 UTC 2012
Modified Files: src/sys/dev/pci: radeonfb.c Log Message: let the fifo drain periodically - we need this even in 8 bit on some hardware, like rv100 paired with a semi-fast CPU To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/pci/radeonfb.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/radeonfb.c diff -u src/sys/dev/pci/radeonfb.c:1.56 src/sys/dev/pci/radeonfb.c:1.57 --- src/sys/dev/pci/radeonfb.c:1.56 Tue Feb 28 20:23:51 2012 +++ src/sys/dev/pci/radeonfb.c Tue Feb 28 21:22:20 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: radeonfb.c,v 1.56 2012/02/28 20:23:51 macallan Exp $ */ +/* $NetBSD: radeonfb.c,v 1.57 2012/02/28 21:22:20 macallan Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.56 2012/02/28 20:23:51 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.57 2012/02/28 21:22:20 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2672,7 +2672,7 @@ radeonfb_putchar_aa8(void *cookie, int r int i, x, y, wi, he, r, g, b, aval; int r1, g1, b1, r0, g0, b0, fgo, bgo; uint8_t *data8; - int rv; + int rv, cnt; if (dp->rd_wsmode != WSDISPLAYIO_MODE_EMUL) return; @@ -2734,6 +2734,9 @@ radeonfb_putchar_aa8(void *cookie, int r #define R3G3B2(r, g, b) ((r & 0xe0) | ((g >> 3) & 0x1c) | (b >> 6)) bg8 = R3G3B2(r0, g0, b0); fg8 = R3G3B2(r1, g1, b1); + + radeonfb_wait_fifo(sc, 20); + cnt = 0; for (i = 0; i < ri->ri_fontscale; i++) { aval = *data8; if (aval == 0) { @@ -2757,6 +2760,11 @@ radeonfb_putchar_aa8(void *cookie, int r * out */ latch = 0; + cnt++; + if (cnt > 16) { + cnt = 0; + radeonfb_wait_fifo(sc, 20); + } } data8++; }