drm/amdgpu: fix amdgpu_ring_write_multiple
authorChristian König <christian.koenig@amd.com>
Wed, 28 Jun 2017 11:50:07 +0000 (13:50 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jul 2017 15:05:56 +0000 (11:05 -0400)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h

index 04cbc3a4d4bf4132c8257e02937e8d268af56800..322d25299a00cf364fba3b8ad4343ffa22b3efb5 100644 (file)
@@ -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];