Commit 97442140 authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amd/powerplay: add smu_smc_read_sensor support for arcturus

the bellow patch refine the sensor read sequence,
but missed to add arcuturs support. (arcuturs_ppt.c)
it will cause some sensor is not supported in arcturus.

drm/amd/powerplay: change smu_read_sensor sequence in smu
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6a9d8de7
...@@ -1022,6 +1022,9 @@ static int arcturus_read_sensor(struct smu_context *smu, ...@@ -1022,6 +1022,9 @@ static int arcturus_read_sensor(struct smu_context *smu,
PPTable_t *pptable = table_context->driver_pptable; PPTable_t *pptable = table_context->driver_pptable;
int ret = 0; int ret = 0;
if (!data || !size)
return -EINVAL;
switch (sensor) { switch (sensor) {
case AMDGPU_PP_SENSOR_MAX_FAN_RPM: case AMDGPU_PP_SENSOR_MAX_FAN_RPM:
*(uint32_t *)data = pptable->FanMaximumRpm; *(uint32_t *)data = pptable->FanMaximumRpm;
...@@ -1046,7 +1049,7 @@ static int arcturus_read_sensor(struct smu_context *smu, ...@@ -1046,7 +1049,7 @@ static int arcturus_read_sensor(struct smu_context *smu,
*size = 4; *size = 4;
break; break;
default: default:
return -EINVAL; ret = smu_smc_read_sensor(smu, sensor, data, size);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment