aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorSunil Khatri <sunil.khatri@amd.com>2024-10-08 18:40:50 +0530
committerAlex Deucher <alexander.deucher@amd.com>2024-10-15 11:16:46 -0400
commita23575bb3c25d86c616931c416e0dd07128ce40a (patch)
tree0f3eec1042481a399821b05055ded80b57444733 /drivers/gpu/drm/amd/amdgpu
parentdrm/amdgpu: optimize insert_nop using multi dwords (diff)
downloadlinux-a23575bb3c25d86c616931c416e0dd07128ce40a.tar.gz
linux-a23575bb3c25d86c616931c416e0dd07128ce40a.zip
drm/amdgpu: optimize fn gfx_v9_4_3_ring_insert_nop
Optimize gfx_v9_4_3_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 <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index 7d425d2e7ab0..ff867077c7be 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -4569,8 +4569,6 @@ static void gfx_v9_4_3_enable_watchdog_timer(struct amdgpu_device *adev)
static void gfx_v9_4_3_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);
@@ -4581,8 +4579,7 @@ static void gfx_v9_4_3_ring_insert_nop(struct amdgpu_ring *ring, uint32_t num_no
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_v9_4_3_ip_print(struct amdgpu_ip_block *ip_block, struct drm_printer *p)
48b10321&follow=1'>net: phy: hide the PHYLIB_LEDS knobPaolo Abeni1-3/+1 2023-04-26powerpc/64s: Disable pcrel code model on ClangNicholas Piggin1-1/+6 2023-04-26powerpc: Fix merge conflict between pcrel and copy_thread changesNicholas Piggin1-1/+1 2023-04-25RISC-V: hwprobe: Remove __init on probe_vendor_features()Evan Green3-6/+6 2023-04-25recordmcount: Fix memory leaks in the uwrite functionHao Zeng1-1/+5 2023-04-25tracing/user_events: Limit max fault-in attemptsBeau Belgrave1-14/+35 2023-04-25tracing/user_events: Prevent same address and bit per processBeau Belgrave2-1/+49 2023-04-25tracing/user_events: Ensure bit is cleared on unregisterBeau Belgrave2-3/+40 2023-04-25tracing/user_events: Ensure write index cannot be negativeBeau Belgrave2-0/+8 2023-04-25seq_buf: Add seq_buf_do_printk() helperSergey Senozhatsky2-0/+34 2023-04-25tracing: Fix print_fields() for __dyn_loc/__rel_locBeau Belgrave1-4/+6 2023-04-25tracing/user_events: Set event filter_type from typeBeau Belgrave1-0/+3 2023-04-25ring-buffer: Clearly check null ptr returned by rb_set_head_page()Zheng Yejian1-2/+3 2023-04-25rtla/timerlat: Fix "Previous IRQ" auto analysis' lineDaniel Bristot de Oliveira1-1/+1 2023-04-25rtla/timerlat: Add auto-analysis only optionDaniel Bristot de Oliveira2-5/+51 2023-04-25rv: Remove redundant assignment to variable retvalColin Ian King1-2/+0 2023-04-25rv: Fix addition on an uninitialized variable 'run'Colin Ian King1-1/+1