drm/amdgpu: fix send ras disable cmd when asic not support ras
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix send ras disable cmd when asic not support ras
cause:
It is necessary to send ras disable command to ras-ta to program GB_EDC_MODE to "BYPASS" mode during gfx block ras later init, because the ras capability is disable read from vbios for vega20 gaming, but the ras context is released during ras init process,
this will cause send ras disable command to ras-to failed.
how:
Delay releasing ras context, the ras context
will be released after gfx block later init done.
Changed from V1:
move release_ras_context into ras_resume
Signed-off-by Stanley.Yang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 57 +++++++++++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 2 + .../gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 ++ 4 files changed, 58 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -3
@@ -3499,11 +3499,11 @@ int amdgpu_device_init(struct amdgpu_device *adev, adev->virt.caps &= ~AMDGPU_SRIOV_CAPS_RUNTIME ; adev->virt.ops =NULL ; r = -EAGAIN ; - goto failed; + goto release_ras_con; }dev_err (adev->dev,"amdgpu_device_ip_init failed\n" );amdgpu_vf_error_put (adev,AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL ,0 ,0 ); - goto failed; + goto release_ras_con; } dev_info(adev->dev,
@@ -3568,7 +3568,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,if (r) {dev_err (adev->dev,"amdgpu_device_ip_late_init failed\n" );amdgpu_vf_error_put (adev,AMDGIM_ERROR_VF_AMDGPU_LATE_INIT_FAIL ,0 , r); - goto failed; + goto release_ras_con; }/* must succeed. */
@@ -3595,6 +3595,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,return 0 ; +release_ras_con: +amdgpu_release_ras_context (adev); + failed:amdgpu_vf_error_trans_all (adev);if (atpx)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +46 -11
139 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +2 -0
@@ -626,4 +626,6 @@ void amdgpu_ras_global_ras_isr(struct amdgpu_device *adev);void amdgpu_ras_set_error_query_ready (struct amdgpu_device *adev,bool ready);bool amdgpu_ras_need_emergency_restart (struct amdgpu_device *adev); + +void amdgpu_release_ras_context (struct amdgpu_device *adev);#endif
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +4 -0
@@ -441,6 +441,10 @@ bool amdgpu_ras_eeprom_check_err_threshold(struct amdgpu_device *adev)if (!__is_ras_eeprom_supported (adev))return false; +/* skip check VEGA20 Gaming */ +if (!adev->ras_features) +return false; +if (con->eeprom_control.tbl_hdr.header ==EEPROM_TABLE_HDR_BAD ) {dev_warn (adev->dev,"This GPU is in BAD status." ); dev_warn(adev->dev, "Please retire it or setting one bigger "
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx