From: Kevin Wang Date: Tue, 15 Jan 2019 04:25:59 +0000 (+0800) Subject: drm/amd/powerplay: implement sensor of SCLK and MCLK for smu11 X-Git-Tag: v5.4-rc1~971^2~36^2~279 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9b6604351777f6ed4f2e47d2a1be66216149554;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/powerplay: implement sensor of SCLK and MCLK for smu11 add sensor interface of SCLK and MCKL for sys interface and hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan 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 7ea19eb..659e911 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -1021,6 +1021,14 @@ static int smu_v11_0_read_sensor(struct smu_context *smu, (uint32_t *)data); *size = 4; break; + case AMDGPU_PP_SENSOR_GFX_MCLK: + ret = smu_get_current_clk_freq(smu, PPCLK_UCLK, (uint32_t *)data); + *size = 4; + break; + case AMDGPU_PP_SENSOR_GFX_SCLK: + ret = smu_get_current_clk_freq(smu, PPCLK_GFXCLK, (uint32_t *)data); + *size = 4; + break; default: ret = -EINVAL; break;