[PATCH] nv50: use BGN_RELOC

Christoph Bumiller e0425955 at student.tuwien.ac.at
Sun Mar 14 06:51:03 PDT 2010


---
 src/gallium/drivers/nv50/nv50_screen.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 2b0c9fd..effe20b 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -212,37 +212,37 @@ nv50_screen_relocs(struct nv50_screen *screen)
 	unsigned i;
 	const unsigned rl = NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_DUMMY;
 
+	MARK_RING (chan, 28, 26);
+
 	/* cause grobj autobind */
 	BEGIN_RING(chan, tesla, 0x0100, 1);
 	OUT_RING  (chan, 0);
 
-	OUT_RELOC (chan, screen->tic, (tesla->subc << 13) |
-		   NV50TCL_TIC_ADDRESS_HIGH | (2 << 18), rl, 0, 0);
+	BGN_RELOC (chan, screen->tic, tesla, NV50TCL_TIC_ADDRESS_HIGH, 2, rl);
 	OUT_RELOCh(chan, screen->tic, 0, rl);
 	OUT_RELOCl(chan, screen->tic, 0, rl);
 
-	OUT_RELOC (chan, screen->tsc, (tesla->subc << 13) |
-		   NV50TCL_TSC_ADDRESS_HIGH | (2 << 18), rl, 0, 0);
+	BGN_RELOC (chan, screen->tsc, tesla, NV50TCL_TSC_ADDRESS_HIGH, 2, rl);
 	OUT_RELOCh(chan, screen->tsc, 0, rl);
 	OUT_RELOCl(chan, screen->tsc, 0, rl);
 
-	OUT_RELOC (chan, screen->constbuf_misc[0], (tesla->subc << 13) |
-		   NV50TCL_CB_DEF_ADDRESS_HIGH | (3 << 18), rl, 0, 0);
+	BGN_RELOC (chan, screen->constbuf_misc[0],
+		   tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl);
 	OUT_RELOCh(chan, screen->constbuf_misc[0], 0, rl);
 	OUT_RELOCl(chan, screen->constbuf_misc[0], 0, rl);
 	OUT_RELOC (chan, screen->constbuf_misc[0],
 		   (NV50_CB_PMISC << 16) | 0x0200, rl, 0, 0);
 
-	OUT_RELOC (chan, screen->constbuf_misc[0], (tesla->subc << 13) |
-		   NV50TCL_CB_DEF_ADDRESS_HIGH | (3 << 18), rl, 0, 0);
+	BGN_RELOC (chan, screen->constbuf_misc[0],
+		   tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl);
 	OUT_RELOCh(chan, screen->constbuf_misc[0], 0x200, rl);
 	OUT_RELOCl(chan, screen->constbuf_misc[0], 0x200, rl);
 	OUT_RELOC (chan, screen->constbuf_misc[0],
 		   (NV50_CB_AUX << 16) | 0x0200, rl, 0, 0);
 
 	for (i = 0; i < 3; ++i) {
-		OUT_RELOC (chan, screen->constbuf_parm[i], (tesla->subc << 13) |
-			   NV50TCL_CB_DEF_ADDRESS_HIGH | (3 << 18), rl, 0, 0);
+		BGN_RELOC (chan, screen->constbuf_parm[i],
+			   tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3, rl);
 		OUT_RELOCh(chan, screen->constbuf_parm[i], 0, rl);
 		OUT_RELOCl(chan, screen->constbuf_parm[i], 0, rl);
 		OUT_RELOC (chan, screen->constbuf_parm[i],
-- 
1.6.4.4


--------------030502090800040303050904--


More information about the Nouveau mailing list