mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
This commit is contained in:
parent
dee53e7fb3
commit
07a713305a
1 changed files with 1 additions and 6 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue