From: Kevin Wang Date: Fri, 25 Jan 2019 08:22:20 +0000 (+0800) Subject: drm/amd/powerplay: implement sensor of uvd & vce power state for smu11 X-Git-Tag: v5.15~6346^2~36^2~227 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41a84248ee39392251c24c9e7c76646695837440;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/powerplay: implement sensor of uvd & vce power state for smu11 add functions of uvd & vce for hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index cdaf23f..3ebf89b 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -1119,6 +1119,14 @@ 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; default: ret = smu_common_read_sensor(smu, sensor, data, size); break;