summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-02-23 11:06:31 +0100
committerLuca Barbieri <luca@luca-barbieri.com>2010-04-12 12:13:15 +0200
commite0af5c9b5457d560ab075118881de01e0277ed14 (patch)
treeb3ffc3090c9b2b6a211bc663c6d24f9741195a44 /src/gallium/drivers/nouveau
parent507dc546c3da415036521fcf91e76af88c2cbf69 (diff)
nouveau: bind the 3D engine to subchannel 7 and add RING_3D
RING_3D creates a method start for subchannel 7. Bind the 3D engine to a fixed subchannel to make it work This is much faster than the old BEGIN_RING, since we don't need to waste cycles trying to "autobind" stuff, when a fast static binding is perfectly good. Subchannel 7 is chosen because the kernel takes up the lowest ones.
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h
index c0ec6e4895..f32ecd0b69 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.h
+++ b/src/gallium/drivers/nouveau/nouveau_screen.h
@@ -60,4 +60,16 @@ void nouveau_screen_fini(struct nouveau_screen *);
+static __inline__ unsigned
+RING_3D(unsigned mthd, unsigned size)
+{
+ return (7 << 13) | (size << 18) | mthd;
+}
+
+static __inline__ unsigned
+RING_3D_NI(unsigned mthd, unsigned size)
+{
+ return 0x40000000 | (7 << 13) | (size << 18) | mthd;
+}
+
#endif