Module: Mesa
Branch: master
Commit: 7bf678f7ec86c152e22639b47cf038f94912fbc8
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7bf678f7ec86c152e22639b47cf038f94912fbc8

Author: Ben Skeggs <[email protected]>
Date:   Wed Jun  9 11:26:46 2010 +1000

nv50: use MARK_RING correctly

---

 src/gallium/drivers/nv50/nv50_surface.c |   10 ++++++----
 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 814921f..d701c7a 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)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to