Skip to content

Commit 952ee94

Browse files
erichuang22alexdeucher
authored andcommitted
drm/amdgpu: enable trap of each kfd vmid for gfx v9.4.3
To setup ttmp on as default for gfx v9.4.3 in IP hw init. Signed-off-by: Eric Huang <[email protected]> Reviewed-by: Jonathan Kim <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a6c4d01 commit 952ee94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ static void gfx_v9_4_3_xcc_init_compute_vmid(struct amdgpu_device *adev,
899899
int i;
900900
uint32_t sh_mem_config;
901901
uint32_t sh_mem_bases;
902+
uint32_t data;
902903

903904
/*
904905
* Configure apertures:
@@ -918,6 +919,11 @@ static void gfx_v9_4_3_xcc_init_compute_vmid(struct amdgpu_device *adev,
918919
/* CP and shaders */
919920
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regSH_MEM_CONFIG, sh_mem_config);
920921
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regSH_MEM_BASES, sh_mem_bases);
922+
923+
/* Enable trap for each kfd vmid. */
924+
data = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regSPI_GDBG_PER_VMID_CNTL);
925+
data = REG_SET_FIELD(data, SPI_GDBG_PER_VMID_CNTL, TRAP_EN, 1);
926+
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regSPI_GDBG_PER_VMID_CNTL, data);
921927
}
922928
soc15_grbm_select(adev, 0, 0, 0, 0, GET_INST(GC, xcc_id));
923929
mutex_unlock(&adev->srbm_mutex);

0 commit comments

Comments
 (0)