Commit 369421cb authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix amdgpu_ring_write_multiple

Overwriting still used ring content has a low probability to cause
problems, not writing at all has 100% probability to cause problems.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
parent e8110b1c
...@@ -227,10 +227,8 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring, ...@@ -227,10 +227,8 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring,
unsigned occupied, chunk1, chunk2; unsigned occupied, chunk1, chunk2;
void *dst; void *dst;
if (unlikely(ring->count_dw < count_dw)) { if (unlikely(ring->count_dw < count_dw))
DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n"); DRM_ERROR("amdgpu: writing more dwords to the ring than expected!\n");
return;
}
occupied = ring->wptr & ring->buf_mask; occupied = ring->wptr & ring->buf_mask;
dst = (void *)&ring->ring[occupied]; dst = (void *)&ring->ring[occupied];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment