aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
diff options
context:
space:
mode:
authorSunil Khatri <[email protected]>2024-10-08 13:16:49 +0000
committerAlex Deucher <[email protected]>2024-10-15 15:17:09 +0000
commitf83fc3abd59c34fcc9f561db75e35bb01c07885a (patch)
tree558db33a607b63f448be3cef9ef7c193b0b91be7 /drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
parentdrm/amdgpu: optimize fn gfx_v11_ring_insert_nop (diff)
downloadkernel-f83fc3abd59c34fcc9f561db75e35bb01c07885a.tar.gz
kernel-f83fc3abd59c34fcc9f561db75e35bb01c07885a.zip
drm/amdgpu: optimize fn gfx_v12_ring_insert_nop
Optimize gfx_v12_ring_insert_nop() to call optimized version of amdgpu_ring_insert_nop instead of calling amdgpu_ring_write for number of nop times. Signed-off-by: Sunil Khatri <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
index 02244bd2c418..4e34e2b0e6e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c
@@ -5034,8 +5034,6 @@ static void gfx_v12_0_emit_mem_sync(struct amdgpu_ring *ring)
static void gfx_v12_ring_insert_nop(struct amdgpu_ring *ring, uint32_t num_nop)
{
- int i;
-
/* Header itself is a NOP packet */
if (num_nop == 1) {
amdgpu_ring_write(ring, ring->funcs->nop);
@@ -5046,8 +5044,7 @@ static void gfx_v12_ring_insert_nop(struct amdgpu_ring *ring, uint32_t num_nop)
amdgpu_ring_write(ring, PACKET3(PACKET3_NOP, min(num_nop - 2, 0x3ffe)));
/* Header is at index 0, followed by num_nops - 1 NOP packet's */
- for (i = 1; i < num_nop; i++)
- amdgpu_ring_write(ring, ring->funcs->nop);
+ amdgpu_ring_insert_nop(ring, num_nop - 1);
}
static void gfx_v12_0_ring_emit_cleaner_shader(struct amdgpu_ring *ring)