Add CP and GFX Queue register in ip Dump for
Subsystems (2)
cover Add CP and GFX Queue register in ip Dump for
*** BLURB HERE ***
Sunil Khatri (4):
drm/amdgpu: update the ip_dump to ipdump_core drm/amdgpu: Add support to dump gfx10 cp registers drm/amdgpu: add support to dump gfx10 queue registers drm/amdgpu: add prints while ip registr dump
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 214 +++++++++++++++++++-- 3 files changed, 208 insertions(+), 12 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/4 drm/amdgpu: update the ip_dump to ipdump_core
Update the memory pointer from ip_dump to ipdump_core to make it specific to core registers and rest other registers to be dumped in their respective memories.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -1
@@ -435,7 +435,7 @@ struct amdgpu_gfx {bool mcbp;/* mid command buffer preemption */ /* IP reg dump */ -uint32_t *ip_dump; +uint32_t *ipdump_core; };struct amdgpu_gfx_ras_reg_entry {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +7 -7
@@ -4603,9 +4603,9 @@ static void gfx_v10_0_alloc_dump_mem(struct amdgpu_device *adev) ptr =kcalloc (reg_count,sizeof (uint32_t ),GFP_KERNEL );if (ptr ==NULL ) {DRM_ERROR ("Failed to allocate memory for IP Dump\n" ); - adev->gfx.ip_dump =NULL ; + adev->gfx.ipdump_core =NULL ; }else { - adev->gfx.ip_dump = ptr; + adev->gfx.ipdump_core = ptr; } }
@@ -4815,7 +4815,7 @@ static int gfx_v10_0_sw_fini(void *handle)gfx_v10_0_free_microcode (adev); -kfree (adev->gfx.ip_dump); +kfree (adev->gfx.ipdump_core);return 0 ; }
@@ -9283,13 +9283,13 @@ static void gfx_v10_ip_print(void *handle, struct drm_printer *p)uint32_t i;uint32_t reg_count =ARRAY_SIZE (gc_reg_list_10_1); -if (!adev->gfx.ip_dump) +if (!adev->gfx.ipdump_core)return ;for (i =0 ; i < reg_count; i++)drm_printf (p,"%-50s \t 0x%08x\n" , gc_reg_list_10_1[i].reg_name, - adev->gfx.ip_dump[i]); + adev->gfx.ipdump_core[i]); }static void gfx_v10_ip_dump (void *handle)
@@ -9298,12 +9298,12 @@ static void gfx_v10_ip_dump(void *handle)uint32_t i;uint32_t reg_count =ARRAY_SIZE (gc_reg_list_10_1); -if (!adev->gfx.ip_dump) +if (!adev->gfx.ipdump_core)return ;amdgpu_gfx_off_ctrl (adev, false);for (i =0 ; i < reg_count; i++) - adev->gfx.ip_dump[i] =RREG32 (SOC15_REG_ENTRY_OFFSET (gc_reg_list_10_1[i])); + adev->gfx.ipdump_core[i] =RREG32 (SOC15_REG_ENTRY_OFFSET (gc_reg_list_10_1[i]));amdgpu_gfx_off_ctrl (adev, true); }
Signature · 1 line
2.34.1
PATCH v2 2/4 drm/amdgpu: Add support to dump gfx10 cp registers
In reply to Sunil Khatriadd support to dump registers of all instances of
cp registers in gfx10
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 117 +++++++++++++++++++++++- 2 files changed, 114 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -0
@@ -436,6 +436,7 @@ struct amdgpu_gfx {/* IP reg dump */ uint32_t *ipdump_core; +uint32_t *ipdump_cp; };struct amdgpu_gfx_ras_reg_entry {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +113 -4
173 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 3/4 drm/amdgpu: add support to dump gfx10 queue registers
In reply to Sunil KhatriAdd gfx queue register for all instances in ip dump for gfx10.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 86 +++++++++++++++++++++++++ 2 files changed, 87 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +1 -0
@@ -437,6 +437,7 @@ struct amdgpu_gfx {/* IP reg dump */ uint32_t *ipdump_core;uint32_t *ipdump_cp; +uint32_t *ipdump_gfx_queue; };struct amdgpu_gfx_ras_reg_entry {
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +86 -0
116 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v2 4/4 drm/amdgpu: add prints while ip registr dump
In reply to Sunil Khatriadd prints before and after during ip registers
dump. It avoids user to think of system being
stuck/hung as register dump takes time after a
gpu hang.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -5373,11 +5373,13 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,if (!test_bit (AMDGPU_SKIP_COREDUMP , &reset_context->flags)) {amdgpu_reset_reg_dumps (tmp_adev); +dev_info (tmp_adev->dev,"Dumping IP Registers\n" );/* Trigger ip dump before we reset the asic */ for (i =0 ; i < tmp_adev->num_ip_blocks; i++)if (tmp_adev->ip_blocks[i].version->funcs->dump_ip_state) tmp_adev->ip_blocks[i].version->funcs ->dump_ip_state ((void *)tmp_adev); +dev_info (tmp_adev->dev,"Dumping IP Registers Completed\n" ); } reset_context->reset_device_list = device_list_handle;
Signature · 1 line
2.34.1