summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-06-28 13:50:07 +0200
committerAlex Deucher <alexander.deucher@amd.com>2017-07-14 11:05:56 -0400
commit369421cbfabf0650b73571d7d1c026fc3830e74d (patch)
treeb9b07c03b1766184e47d1db4cb1708c70df3068a /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
parente8110b1c9bdd3d76610a9783724233a570964d3c (diff)
downloadtalos-op-linux-369421cbfabf0650b73571d7d1c026fc3830e74d.tar.gz
talos-op-linux-369421cbfabf0650b73571d7d1c026fc3830e74d.zip
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: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 04cbc3a4d4bf..322d25299a00 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -227,10 +227,8 @@ static inline void amdgpu_ring_write_multiple(struct amdgpu_ring *ring,
unsigned occupied, chunk1, chunk2;
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");
- return;
- }
occupied = ring->wptr & ring->buf_mask;
dst = (void *)&ring->ring[occupied];
OpenPOWER on IntegriCloud