drm/amdgpu/gfx7: enable wave kill for compute queues
Subsystems (2)
Alex Deucher
maintainerPATCH 1/7 drm/amdgpu/gfx7: enable wave kill for compute queues
It should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1 -0
@@ -5002,6 +5002,7 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = { .insert_nop = amdgpu_ring_insert_nop, .pad_ib = amdgpu_ring_generic_pad_ib, .emit_wreg = gfx_v7_0_ring_emit_wreg, + .soft_recovery = gfx_v7_0_ring_soft_recovery, .emit_mem_sync = gfx_v7_0_emit_mem_sync_compute, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 2/7 drm/amdgpu/gfx8: enable wave kill for compute queues
It should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -0
@@ -6955,6 +6955,7 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_compute = { .insert_nop = amdgpu_ring_insert_nop, .pad_ib = amdgpu_ring_generic_pad_ib, .emit_wreg = gfx_v8_0_ring_emit_wreg, + .soft_recovery = gfx_v8_0_ring_soft_recovery, .emit_mem_sync = gfx_v8_0_emit_mem_sync_compute, .emit_wave_limit = gfx_v8_0_emit_wave_limit, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 3/7 drm/amdgpu/gfx9: enable wave kill for compute queues
In reply to Alex DeucherIt should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -7244,6 +7244,7 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { .emit_wreg = gfx_v9_0_ring_emit_wreg, .emit_reg_wait = gfx_v9_0_ring_emit_reg_wait, .emit_reg_write_reg_wait = gfx_v9_0_ring_emit_reg_write_reg_wait, + .soft_recovery = gfx_v9_0_ring_soft_recovery, .emit_mem_sync = gfx_v9_0_emit_mem_sync, .emit_wave_limit = gfx_v9_0_emit_wave_limit, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 4/7 drm/amdgpu/gfx9.4.3: implement wave kill for compute queues
In reply to Alex DeucherBased on gfx9.0 implementation.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +14 -0
@@ -2833,6 +2833,19 @@ static void gfx_v9_4_3_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring, ref, mask); } +static void gfx_v9_4_3_ring_soft_recovery (struct amdgpu_ring *ring, +unsigned vmid) +{ +struct amdgpu_device *adev = ring->adev; +uint32_t value =0 ; + + value =REG_SET_FIELD (value,SQ_CMD ,CMD ,0x03 ); + value =REG_SET_FIELD (value,SQ_CMD ,MODE ,0x01 ); + value =REG_SET_FIELD (value,SQ_CMD ,CHECK_VMID ,1 ); + value =REG_SET_FIELD (value,SQ_CMD ,VM_ID , vmid); +WREG32_SOC15 (GC ,GET_INST (GC , ring->xcc_id), regSQ_CMD, value); +} +static void gfx_v9_4_3_xcc_set_compute_eop_interrupt_state (struct amdgpu_device *adev,int me,int pipe,enum amdgpu_interrupt_state state,int xcc_id)
@@ -4116,6 +4129,7 @@ static const struct amdgpu_ring_funcs gfx_v9_4_3_ring_funcs_compute = { .emit_wreg = gfx_v9_4_3_ring_emit_wreg, .emit_reg_wait = gfx_v9_4_3_ring_emit_reg_wait, .emit_reg_write_reg_wait = gfx_v9_4_3_ring_emit_reg_write_reg_wait, + .soft_recovery = gfx_v9_4_3_ring_soft_recovery, .emit_mem_sync = gfx_v9_4_3_emit_mem_sync, .emit_wave_limit = gfx_v9_4_3_emit_wave_limit, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 5/7 drm/amdgpu/gfx10: enable wave kill for compute queues
In reply to Alex DeucherIt should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -9480,6 +9480,7 @@ static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = { .emit_wreg = gfx_v10_0_ring_emit_wreg, .emit_reg_wait = gfx_v10_0_ring_emit_reg_wait, .emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait, + .soft_recovery = gfx_v10_0_ring_soft_recovery, .emit_mem_sync = gfx_v10_0_emit_mem_sync, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 6/7 drm/amdgpu/gfx11: enable wave kill for compute queues
In reply to Alex DeucherIt should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -0
@@ -6603,6 +6603,7 @@ static const struct amdgpu_ring_funcs gfx_v11_0_ring_funcs_compute = { .emit_wreg = gfx_v11_0_ring_emit_wreg, .emit_reg_wait = gfx_v11_0_ring_emit_reg_wait, .emit_reg_write_reg_wait = gfx_v11_0_ring_emit_reg_write_reg_wait, + .soft_recovery = gfx_v11_0_ring_soft_recovery, .emit_mem_sync = gfx_v11_0_emit_mem_sync, };
Signature · 1 line
2.45.2
Alex Deucher
maintainerPATCH 7/7 drm/amdgpu/gfx12: enable wave kill for compute queues
In reply to Alex DeucherIt should work the same for compute as well as gfx.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +1 -0
@@ -5081,6 +5081,7 @@ static const struct amdgpu_ring_funcs gfx_v12_0_ring_funcs_compute = { .emit_wreg = gfx_v12_0_ring_emit_wreg, .emit_reg_wait = gfx_v12_0_ring_emit_reg_wait, .emit_reg_write_reg_wait = gfx_v12_0_ring_emit_reg_write_reg_wait, + .soft_recovery = gfx_v12_0_ring_soft_recovery, .emit_mem_sync = gfx_v12_0_emit_mem_sync, };
Signature · 1 line
2.45.2
Am 17.07.24 um 22:37 schrieb Alex Deucher:
Quoted 3 lines
It should work the same for compute as well as gfx.
Signed-off-by Alex Deucher <[email protected]>
Quoted 16 lines
--- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +1
-0@@ -5002,6 +5002,7 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = { .insert_nop = amdgpu_ring_insert_nop, .pad_ib = amdgpu_ring_generic_pad_ib, .emit_wreg = gfx_v7_0_ring_emit_wreg, + .soft_recovery = gfx_v7_0_ring_soft_recovery, .emit_mem_sync = gfx_v7_0_emit_mem_sync_compute, };