diff options
author | Kevin Wang <kevin1.wang@amd.com> | 2019-03-05 14:16:12 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-21 18:59:25 -0500 |
commit | 6d22f1aa924c6012e4107b40b111c21b9d2b5c0d (patch) | |
tree | 85b87426fe1607a7f2eb216bf2ee7e80f6860104 /drivers/gpu/drm/amd/powerplay/smu_v11_0.c | |
parent | 86eb3ed3d393678a0ba625138658b755adbda357 (diff) | |
download | linux-6d22f1aa924c6012e4107b40b111c21b9d2b5c0d.tar.bz2 |
drm/amd/powerplay: move the function of read_sensor to asic file
The read_sensor functions has asic related parts code,
so move them to asic file to implement.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index a62a48efb6f9..664de88f7f43 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -1381,14 +1381,6 @@ static int smu_v11_0_read_sensor(struct smu_context *smu, ret = smu_v11_0_get_gfx_vdd(smu, (uint32_t *)data); *size = 4; break; - case AMDGPU_PP_SENSOR_UVD_POWER: - *(uint32_t *)data = smu_feature_is_enabled(smu, FEATURE_DPM_UVD_BIT) ? 1 : 0; - *size = 4; - break; - case AMDGPU_PP_SENSOR_VCE_POWER: - *(uint32_t *)data = smu_feature_is_enabled(smu, FEATURE_DPM_VCE_BIT) ? 1 : 0; - *size = 4; - break; case AMDGPU_PP_SENSOR_MIN_FAN_RPM: *(uint32_t *)data = 0; *size = 4; @@ -1402,6 +1394,10 @@ static int smu_v11_0_read_sensor(struct smu_context *smu, break; } + /* try get sensor data by asic */ + if (ret) + ret = smu_asic_read_sensor(smu, sensor, data, size); + if (ret) *size = 0; |