mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
drm/amdgpu/smu8: return an error rather than 50% if busy query fails
For consistency with SMU10. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
60d06906cd
commit
9a9ec6c32c
1 changed files with 3 additions and 4 deletions
|
@ -1788,11 +1788,10 @@ static int smu8_read_sensor(struct pp_hwmgr *hwmgr, int idx,
|
|||
result = smum_send_msg_to_smc(hwmgr,
|
||||
PPSMC_MSG_GetAverageGraphicsActivity,
|
||||
&activity_percent);
|
||||
if (0 == result) {
|
||||
if (0 == result)
|
||||
activity_percent = activity_percent > 100 ? 100 : activity_percent;
|
||||
} else {
|
||||
activity_percent = 50;
|
||||
}
|
||||
else
|
||||
return -EIO;
|
||||
*((uint32_t *)value) = activity_percent;
|
||||
return 0;
|
||||
case AMDGPU_PP_SENSOR_UVD_POWER:
|
||||
|
|
Loading…
Add table
Reference in a new issue