This should provide more debug info for the driver.

Signed-off-by: Andrey Grodzovsky <andrey.grodzov...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7abdf5e3dc05..22caff7c98a6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4708,6 +4708,14 @@ static int amdgpu_reset_reg_dumps(struct amdgpu_device 
*adev)
        return 0;
 }
 
+
+static void amdgpu_stb_dump(struct amdgpu_device *adev)
+{
+       /* TODO For APU case PMC driver API is to retrieve STB is needed */
+       if (!(adev->flags & AMD_IS_APU))
+               amdgpu_dpm_stb_dump(adev);
+}
+
 int amdgpu_do_asic_reset(struct list_head *device_list_handle,
                         struct amdgpu_reset_context *reset_context)
 {
@@ -4719,6 +4727,7 @@ int amdgpu_do_asic_reset(struct list_head 
*device_list_handle,
        tmp_adev = list_first_entry(device_list_handle, struct amdgpu_device,
                                    reset_list);
        amdgpu_reset_reg_dumps(tmp_adev);
+       amdgpu_stb_dump(tmp_adev);
        r = amdgpu_reset_perform_reset(tmp_adev, reset_context);
        /* If reset handler not implemented, continue; otherwise return */
        if (r == -ENOSYS)
-- 
2.25.1

Reply via email to