radeon: Commit the ring after each partial texture upload blit.
authorchaohong guo <Minskey.Guo@Sun.COM>
Mon, 15 Oct 2007 00:45:49 +0000 (10:45 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 15 Oct 2007 00:45:49 +0000 (10:45 +1000)
This makes sure each blit starts as early as possible, which may improve
texture upload performance in some cases.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/drm/radeon_state.c

index ada820717ade5e8078ca2bf1b5deab32a82ef86b..69c9f2febf43a9b42bb05dada49ac9df8e572c46 100644 (file)
@@ -1861,6 +1861,7 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
                OUT_RING((image->width << 16) | height);
                RADEON_WAIT_UNTIL_2D_IDLE();
                ADVANCE_RING();
+               COMMIT_RING();
 
                radeon_cp_discard_buffer(dev, buf);
 
@@ -1878,6 +1879,8 @@ static int radeon_cp_dispatch_texture(struct drm_device * dev,
        RADEON_FLUSH_CACHE();
        RADEON_WAIT_UNTIL_2D_IDLE();
        ADVANCE_RING();
+       COMMIT_RING();
+
        return 0;
 }
 
@@ -2378,7 +2381,6 @@ static int radeon_cp_texture(struct drm_device *dev, void *data, struct drm_file
 
        ret = radeon_cp_dispatch_texture(dev, file_priv, tex, &image);
 
-       COMMIT_RING();
        return ret;
 }