Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci turns out we can feed some radeons faster than t...



details:   https://anonhg.NetBSD.org/src/rev/c353c629d01e
branches:  trunk
changeset: 772490:c353c629d01e
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Jan 05 21:40:03 2012 +0000

description:
turns out we can feed some radeons faster than they can process image uploads,
so make periodic stops to let the fifo drain a bit
now this works on my Blade 2500 with a 32MB XVR-100

diffstat:

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

diffs (39 lines):

diff -r 77e0b403b9cf -r c353c629d01e sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c    Thu Jan 05 21:32:35 2012 +0000
+++ b/sys/dev/pci/radeonfb.c    Thu Jan 05 21:40:03 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeonfb.c,v 1.50 2012/01/04 15:56:18 macallan Exp $ */
+/*     $NetBSD: radeonfb.c,v 1.51 2012/01/05 21:40:03 macallan Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.50 2012/01/04 15:56:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.51 2012/01/05 21:40:03 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2556,8 +2556,10 @@
         * could process them, especially when doing the alpha blending stuff
         * along the way, so just make sure there's some room in the FIFO and
         * then hammer away
+        * As it turns out we can, so make periodic stops to let the FIFO
+        * drain.
         */
-       radeonfb_wait_fifo(sc, 10);
+       radeonfb_wait_fifo(sc, 20);
        for (i = 0; i < ri->ri_fontscale; i++) {
                aval = *data;
                data++;
@@ -2573,6 +2575,8 @@
                                (g & 0xff00) |
                                (b & 0xff00) >> 8;
                }
+               if (i & 16)
+                       radeonfb_wait_fifo(sc, 20);
                PUT32(sc, RADEON_HOST_DATA0, pixel);
        }
 }



Home | Main Index | Thread Index | Old Index