Skip to content

Commit

Permalink
radeon: Commit the ring after each partial texture upload blit.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chaohong guo authored and Dave Airlie committed Oct 15, 2007
1 parent 54583bf commit eed0f72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/char/drm/radeon_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit eed0f72

Please sign in to comment.