drm/amdgpu: don't ignore the return from thermal_init
Subsystems (2)
PATCH 1/1 drm/amdgpu: don't ignore the return from thermal_init
The current hw_init code for si_dpm ignores the return value of the function attempting to initialize the thermal controller, which in turn sets the dpm_enabled status wrongly to true in hw_init, which should be actually false.
This patch:
- Adds the return value check for thermal controller initialization, and passes the return value to dpm_enable().
- Adds a DRM_ERROR to indicate this failure.
PS: This issue was observed on OLAND while running the reboot stress test.
--- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/si_dpm.c +5 -1
@@ -6868,7 +6868,11 @@ static int si_dpm_enable(struct amdgpu_device *adev)si_start_dpm (adev);si_enable_auto_throttle_source (adev,AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL , true); -si_thermal_start_thermal_controller (adev); + ret =si_thermal_start_thermal_controller (adev); +if (ret) { +DRM_ERROR ("si_thermal_start_thermal_controller failed\n" ); +return ret; + }return 0 ; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 11 lines · Shashank Sharma
The current
hw_initcode forsi_dpmignores the return value of the function attempting to initialize the thermal controller, which in turn sets thedpm_enabledstatus wrongly to true inhw_init, which should be actually false.This patch:
- Adds the return value check for thermal controller initialization, and passes the return value todpm_enable().
- Adds aDRM_ERRORto indicate this failure.
Quoted 8 lines
Cc Alex Deucher <[email protected]>Cc Maruthi Bayyavarapu <[email protected]>Cc Sonny Jing <[email protected]>PS: This issue was observed on OLAND while running the reboot stress test.
Signed-off-by Shashank Sharma <[email protected]>
I have vague memories of this not being a fatal issue so it didn't need to be checked, but it was so long ago I can't remember, and the relevant history is not coming to me.
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/si_dpm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/si_dpm.c +5
-2@@ -6868,7 +6868,11 @@ static int si_dpm_enable(struct amdgpu_device *adev)si_start_dpm (adev);si_enable_auto_throttle_source (adev,AMDGPU_DPM_AUTO_THROTTLE_SRC_THERMAL , true); -si_thermal_start_thermal_controller (adev); + ret =si_thermal_start_thermal_controller (adev); +if (ret) { +DRM_ERROR ("si_thermal_start_thermal_controller failed\n" ); +return ret; + }return 0 ; } --2.25.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx