On Wed, Apr 17, 2024 at 5:38 AM Sunil Khatri <sunil.khatri@xxxxxxx> wrote: > > Add ip dump for each ip of the asic in the > devcoredump for all the ips where a callback > is registered for register dump. > > Signed-off-by: Sunil Khatri <sunil.khatri@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c > index 64fe564b8036..c1cb62683695 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c > @@ -262,6 +262,20 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count, > drm_printf(&p, "Faulty page starting at address: 0x%016llx\n", fault_info->addr); > drm_printf(&p, "Protection fault status register: 0x%x\n\n", fault_info->status); > > + /* dump the ip state for each ip */ > + drm_printf(&p, "IP Dump\n"); > + for (int i = 0; i < coredump->adev->num_ip_blocks; i++) { > + if (coredump->adev->ip_blocks[i].version->funcs->print_ip_state) { > + drm_printf(&p, "IP: %s\n", > + coredump->adev->ip_blocks[i] > + .version->funcs->name); > + coredump->adev->ip_blocks[i] > + .version->funcs->print_ip_state( > + (void *)coredump->adev, &p); > + drm_printf(&p, "\n"); > + } > + } > + > /* Add ring buffer information */ > drm_printf(&p, "Ring buffer information\n"); > for (int i = 0; i < coredump->adev->num_rings; i++) { > -- > 2.34.1 >