diff options
author | Kenneth Feng <kenneth.feng@amd.com> | 2019-07-23 07:16:25 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-08-12 20:47:48 +0300 |
commit | 9b4e63f4513bbd626b2490ce81435a38d7bc3902 (patch) | |
tree | ad43744728c79ddba780e945568a8096d3c200db /drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | |
parent | bee7b51ac93a67c54b77cfa17c87ddde7c661988 (diff) | |
download | linux-9b4e63f4513bbd626b2490ce81435a38d7bc3902.tar.xz |
drm/amd/powerplay: change smu_read_sensor sequence in smu
change the smu_read_sensor sequence to:
asic specific sensor read -> smu v11 specific sensor read -> smu v11 common sensor read
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/amdgpu_smu.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index dd274922ed8a..2d7db2e68140 100644 --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c @@ -413,6 +413,9 @@ int smu_common_read_sensor(struct smu_context *smu, enum amd_pp_sensors sensor, struct smu_power_gate *power_gate = &smu_power->power_gate; int ret = 0; + if(!data || !size) + return -EINVAL; + switch (sensor) { case AMDGPU_PP_SENSOR_STABLE_PSTATE_SCLK: *((uint32_t *)data) = smu->pstate_sclk; |