diff options
author | Christian König <deathsimple@vodafone.de> | 2012-07-07 12:11:32 +0200 |
---|---|---|
committer | Christian König <deathsimple@vodafone.de> | 2012-07-17 10:32:08 +0200 |
commit | 07a713305a2b55d6ec424000f2c5bed1268ac56b (patch) | |
tree | 1f28b262a609dfcd631e8ae13f700faa581d70bf /drivers/gpu/drm/radeon/radeon_ring.c | |
parent | dee53e7fb3ee01b83c75a8e8df8c444049d38058 (diff) | |
download | blackbird-op-linux-07a713305a2b55d6ec424000f2c5bed1268ac56b.tar.gz blackbird-op-linux-07a713305a2b55d6ec424000f2c5bed1268ac56b.zip |
drm/radeon: fix ring commit padding
We don't need to pad anything if the number of dwords
written to the ring already matches the requirements.
Fixes some "writting more dword to ring than expected"
warnings.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ring.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ring.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 0826e77f99ae..674aabac2212 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -272,13 +272,8 @@ int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *ring, unsig void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *ring) { - unsigned count_dw_pad; - unsigned i; - /* We pad to match fetch size */ - count_dw_pad = (ring->align_mask + 1) - - (ring->wptr & ring->align_mask); - for (i = 0; i < count_dw_pad; i++) { + while (ring->wptr & ring->align_mask) { radeon_ring_write(ring, ring->nop); } DRM_MEMORYBARRIER(); |