Skip to content

Commit 2262aca

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu: add print support for gfx12 ipdump
Add support of gfx12 ipdump print so devcoredump could trigger it to dump the captured registers in devcoredump. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent fbbbb62 commit 2262aca

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4756,6 +4756,21 @@ static void gfx_v12_0_emit_mem_sync(struct amdgpu_ring *ring)
47564756
amdgpu_ring_write(ring, gcr_cntl); /* GCR_CNTL */
47574757
}
47584758

4759+
static void gfx_v12_ip_print(void *handle, struct drm_printer *p)
4760+
{
4761+
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
4762+
uint32_t i;
4763+
uint32_t reg_count = ARRAY_SIZE(gc_reg_list_12_0);
4764+
4765+
if (!adev->gfx.ip_dump_core)
4766+
return;
4767+
4768+
for (i = 0; i < reg_count; i++)
4769+
drm_printf(p, "%-50s \t 0x%08x\n",
4770+
gc_reg_list_12_0[i].reg_name,
4771+
adev->gfx.ip_dump_core[i]);
4772+
}
4773+
47594774
static void gfx_v12_ip_dump(void *handle)
47604775
{
47614776
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -4787,6 +4802,7 @@ static const struct amd_ip_funcs gfx_v12_0_ip_funcs = {
47874802
.set_powergating_state = gfx_v12_0_set_powergating_state,
47884803
.get_clockgating_state = gfx_v12_0_get_clockgating_state,
47894804
.dump_ip_state = gfx_v12_ip_dump,
4805+
.print_ip_state = gfx_v12_ip_print,
47904806
};
47914807

47924808
static const struct amdgpu_ring_funcs gfx_v12_0_ring_funcs_gfx = {

0 commit comments

Comments
 (0)