summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-06-09 11:26:46 +1000
committerBen Skeggs <bskeggs@redhat.com>2010-06-09 11:59:01 +1000
commit7bf678f7ec86c152e22639b47cf038f94912fbc8 (patch)
treed2c5a312f5be97e3619e22a6ea7f1f8b4543cdda /src/gallium/drivers/nv50
parentc217d94cca357d38e244754747a1bd15e9cf2557 (diff)
nv50: use MARK_RING correctly
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_surface.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c
index 814921f764..d701c7a75a 100644
--- a/src/gallium/drivers/nv50/nv50_surface.c
+++ b/src/gallium/drivers/nv50/nv50_surface.c
@@ -115,7 +115,6 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
}
if (!bo->tile_flags) {
- MARK_RING (chan, 9, 2); /* flush on lack of space or relocs */
BEGIN_RING(chan, eng2d, mthd, 2);
OUT_RING (chan, format);
OUT_RING (chan, 1);
@@ -126,7 +125,6 @@ nv50_surface_set(struct nv50_screen *screen, struct pipe_surface *ps, int dst)
OUT_RELOCh(chan, bo, ps->offset, flags);
OUT_RELOCl(chan, bo, ps->offset, flags);
} else {
- MARK_RING (chan, 11, 2); /* flush on lack of space or relocs */
BEGIN_RING(chan, eng2d, mthd, 5);
OUT_RING (chan, format);
OUT_RING (chan, 0);
@@ -162,7 +160,9 @@ nv50_surface_do_copy(struct nv50_screen *screen, struct pipe_surface *dst,
struct nouveau_grobj *eng2d = screen->eng2d;
int ret;
- WAIT_RING (chan, 32);
+ ret = MARK_RING(chan, 2*16 + 32, 4);
+ if (ret)
+ return ret;
ret = nv50_surface_set(screen, dst, 1);
if (ret)
@@ -241,7 +241,9 @@ nv50_clear_render_target(struct pipe_context *pipe,
if (format < 0)
return;
- WAIT_RING (chan, 32);
+ ret = MARK_RING (chan, 16 + 32, 2);
+ if (ret)
+ return;
ret = nv50_surface_set(screen, dst, 1);
if (ret)