drm/amdgpu: Print vmid, pasid and more task info in devcoredump
Subsystems (2)
PATCH 1/2 drm/amdgpu: Print vmid, pasid and more task info in devcoredump
These are in the dmesg logs but are missing from devcoredumps.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +6 -1
@@ -356,10 +356,14 @@ amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_infdrm_printf (&p,"kernel: %s\n" ,init_utsname ()->release);drm_printf (&p,"module: " KBUILD_MODNAME "\n" );drm_printf (&p,"time: %ptSp\n" , &coredump->reset_time); +drm_printf (&p,"pasid: %u\n" , coredump->pasid); +drm_printf (&p,"vmid: %u\n" , coredump->vmid);if (coredump->reset_task_info.task.pid) -drm_printf (&p,"process_name: %s PID: %d\n" , +drm_printf (&p,"process_name: %s TGID: %d thread: %s PID: %d\n" , coredump->reset_task_info.process_name, + coredump->reset_task_info.tgid, + coredump->reset_task_info.task.comm, coredump->reset_task_info.task.pid);/* SOC Information */
@@ -563,6 +567,7 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,amdgpu_vm_put_task_info (ti); } coredump->pasid = job->pasid; + coredump->vmid = job->vmid; coredump->num_ibs = job->num_ibs;for (i =0 ; i < job->num_ibs; ++i) { coredump->ibs[i].gpu_addr = job->ibs[i].gpu_addr;
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h +1 -0
@@ -63,6 +63,7 @@ struct amdgpu_coredump_info {char *formatted;unsigned int pasid; +unsigned int vmid;int num_ibs; struct amdgpu_coredump_ib_info ibs[] __counted_by(num_ibs); };
Signature · 1 line
2.55.0
PATCH 2/2 drm/amdgpu: Reserve space for IB contents in devcoredumps
Currently the contents of IBs are abruptly cut off and don't show the full contents. This patch makes sure to reserve space for those contents too so they may be printed.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +3 -0
@@ -235,6 +235,9 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p,drm_printf (p,"\nIB #%d 0x%llx %d dw\n" , i, coredump->ibs[i].gpu_addr, coredump->ibs[i].ib_size_dw); + +for (int j =0 ; j < coredump->ibs[i].ib_size_dw; j++) +drm_printf (p,"0xffffffff\n" ); }return ; }
Signature · 1 line
2.55.0
Re: [PATCH 2/2] drm/amdgpu: Reserve space for IB contents in devcoredumps
Quoted 5 lines · Timur Kristóf
Currently the contents of IBs are abruptly cut off and don't show the full contents. This patch makes sure to reserve space for those contents too so they may be printed.
Signed-off-by Timur Kristóf <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +3
-0@@ -235,6 +235,9 @@ amdgpu_devcoredump_print_ibs(struct drm_printer *p,drm_printf (p,"\nIB #%d 0x%llx %d dw\n" , i, coredump->ibs[i].gpu_addr, coredump->ibs[i].ib_size_dw); + +for (int j =0 ; j < coredump->ibs[i].ib_size_dw; j++) +drm_printf (p,"0xffffffff\n" ); }return ; }
Quoted 3 lines · Timur Kristóf
These are in the dmesg logs but are missing from devcoredumps.
Signed-off-by Timur Kristóf <[email protected]>
Quoted 45 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +6
-1@@ -356,10 +356,14 @@ amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_infdrm_printf (&p,"kernel: %s\n" ,init_utsname ()->release);drm_printf (&p,"module: " KBUILD_MODNAME "\n" );drm_printf (&p,"time: %ptSp\n" , &coredump->reset_time); +drm_printf (&p,"pasid: %u\n" , coredump->pasid); +drm_printf (&p,"vmid: %u\n" , coredump->vmid);if (coredump->reset_task_info.task.pid) -drm_printf (&p,"process_name: %s PID: %d\n" , +drm_printf (&p,"process_name: %s TGID: %d thread: %s PID: %d\n" , coredump->reset_task_info.process_name, + coredump->reset_task_info.tgid, + coredump->reset_task_info.task.comm, coredump->reset_task_info.task.pid);/* SOC Information */ @@ -563,6 +567,7 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,amdgpu_vm_put_task_info (ti); } coredump->pasid = job->pasid; + coredump->vmid = job->vmid; coredump->num_ibs = job->num_ibs;for (i =0 ; i < job->num_ibs; ++i) { coredump->ibs[i].gpu_addr = job->ibs[i].gpu_addr;drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h +1
-0@@ -63,6 +63,7 @@ struct amdgpu_coredump_info {char *formatted;unsigned int pasid; +unsigned int vmid;int num_ibs; struct amdgpu_coredump_ib_info ibs[] __counted_by(num_ibs); };
Alex Deucher
AppliedApplied the series. Thanks!
Quoted 54 lines · Christian König
Quoted 3 lines · Timur Kristóf
These are in the dmesg logs but are missing from devcoredumps.
Signed-off-by Timur Kristóf <[email protected]>Reviewed-by Christian König <[email protected]>Quoted 45 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 7 ++++++- drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c +6
-1@@ -356,10 +356,14 @@ amdgpu_devcoredump_format(char *buffer, size_t count, struct amdgpu_coredump_infdrm_printf (&p,"kernel: %s\n" ,init_utsname ()->release);drm_printf (&p,"module: " KBUILD_MODNAME "\n" );drm_printf (&p,"time: %ptSp\n" , &coredump->reset_time); +drm_printf (&p,"pasid: %u\n" , coredump->pasid); +drm_printf (&p,"vmid: %u\n" , coredump->vmid);if (coredump->reset_task_info.task.pid) -drm_printf (&p,"process_name: %s PID: %d\n" , +drm_printf (&p,"process_name: %s TGID: %d thread: %s PID: %d\n" , coredump->reset_task_info.process_name, + coredump->reset_task_info.tgid, + coredump->reset_task_info.task.comm, coredump->reset_task_info.task.pid);/* SOC Information */ @@ -563,6 +567,7 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,amdgpu_vm_put_task_info (ti); } coredump->pasid = job->pasid; + coredump->vmid = job->vmid; coredump->num_ibs = job->num_ibs;for (i =0 ; i < job->num_ibs; ++i) { coredump->ibs[i].gpu_addr = job->ibs[i].gpu_addr;drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.h +1
-0@@ -63,6 +63,7 @@ struct amdgpu_coredump_info {char *formatted;unsigned int pasid; +unsigned int vmid;int num_ibs; struct amdgpu_coredump_ib_info ibs[] __counted_by(num_ibs); };