drm/amdgpu: add UTCL2 RAS poison query for gfx 9.4.3
Subsystems (2)
PATCH 1/1 drm/amdgpu: add UTCL2 RAS poison query for gfx 9.4.3
Add help function to query and reset RAS UTCL2 poison status.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +14 -0
@@ -4329,10 +4329,24 @@ static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commoreturn r; } +static bool gfx_v9_4_3_query_uctl2_poison_status (struct amdgpu_device *adev) +{ +u32 status =0 ; +struct amdgpu_vmhub *hub; + + hub = &adev->vmhub[AMDGPU_GFXHUB (0 )]; + status =RREG32 (hub->vm_l2_pro_fault_status); +/* reset page fault status */ +WREG32_P (hub->vm_l2_pro_fault_cntl,1 , ~1 ); + +return REG_GET_FIELD (status,VM_L2_PROTECTION_FAULT_STATUS ,FED ); +} +struct amdgpu_gfx_ras gfx_v9_4_3_ras = { .ras_block = { .hw_ops = &gfx_v9_4_3_ras_ops, .ras_late_init = &gfx_v9_4_3_ras_late_init, }, .enable_watchdog_timer = &gfx_v9_4_3_enable_watchdog_timer, + .query_utcl2_poison_status = &gfx_v9_4_3_query_uctl2_poison_status, };
Signature · 1 line
2.34.1
Quoted 12 lines · Tao Zhou
Add help function to query and reset RAS UTCL2 poison status.
Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commo · line 4337
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +6
-0@@ -4329,10 +4329,24 @@ static int gfx_v9_4_3_ras_late_init(struct amdgpu_device *adev, struct ras_commoreturn r; } +static bool gfx_v9_4_3_query_uctl2_poison_status (struct amdgpu_device *adev) +{ +u32 status =0 ; +struct amdgpu_vmhub *hub; + + hub = &adev->vmhub[AMDGPU_GFXHUB (0 )];
This only take care of the first instance. What about others?
Thanks,
Lijo
Quoted 15 lines
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +8
-0+ status =RREG32 (hub->vm_l2_pro_fault_status); +/* reset page fault status */ +WREG32_P (hub->vm_l2_pro_fault_cntl,1 , ~1 ); + +return REG_GET_FIELD (status,VM_L2_PROTECTION_FAULT_STATUS ,FED ); +} +struct amdgpu_gfx_ras gfx_v9_4_3_ras = { .ras_block = { .hw_ops = &gfx_v9_4_3_ras_ops, .ras_late_init = &gfx_v9_4_3_ras_late_init, }, .enable_watchdog_timer = &gfx_v9_4_3_enable_watchdog_timer, + .query_utcl2_poison_status = &gfx_v9_4_3_query_uctl2_poison_status, };