diff options
| author | Tvrtko Ursulin <tvrtko.ursulin@igalia.com> | 2025-09-09 16:49:37 +0200 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-09-15 16:55:22 -0400 |
| commit | e2ee0f1b1ab1cfdab1ddc832e336fc85da286dfe (patch) | |
| tree | 993e9b649e33122b360640a37ecc511e8c17e19d /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | |
| parent | ae5c2bee1680436d9bf8bfaca7416496adff0ee0 (diff) | |
drm/amdgpu: Use memset32 for ring clearing
Use memset32 instead of open coding it, just because it is
a tiny bit nicer.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h index 4116dfb03499..b6b649179776 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h @@ -481,10 +481,7 @@ static inline void amdgpu_ring_set_preempt_cond_exec(struct amdgpu_ring *ring, static inline void amdgpu_ring_clear_ring(struct amdgpu_ring *ring) { - int i = 0; - while (i <= ring->buf_mask) - ring->ring[i++] = ring->funcs->nop; - + memset32(ring->ring, ring->funcs->nop, ring->buf_mask + 1); } static inline void amdgpu_ring_write(struct amdgpu_ring *ring, uint32_t v) |