[PATCH 2/2] drm/amdgpu/smu8: return an error rather than 50% if busy query fails

Alex Deucher alexander.deucher at amd.com
Wed Mar 10 17:11:37 UTC 2021


For consistency with SMU10.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
index 2cef9c0c6d6f..e64c6ff75b44 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
@@ -1791,7 +1791,7 @@ static int smu8_read_sensor(struct pp_hwmgr *hwmgr, int idx,
 		if (0 == result) {
 			activity_percent = activity_percent > 100 ? 100 : activity_percent;
 		} else {
-			activity_percent = 50;
+			return -EIO;
 		}
 		*((uint32_t *)value) = activity_percent;
 		return 0;
-- 
2.29.2



More information about the amd-gfx mailing list