summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-09-21 06:36:23 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-09-27 05:09:11 +0300
commitd152d373a6e4a302be4a7f803125750d59f301e6 (patch)
tree84da40897b8c99cbae6aa51e2352deb69da6828d /drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
parent1f6c52ed09f28da249c00ebc55d112cf7c7f4dc7 (diff)
downloadlinux-d152d373a6e4a302be4a7f803125750d59f301e6.tar.xz
drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega12
So we can query what features are enabled for debugging. Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
index de81abfbf4f1..9600e2f226e9 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
@@ -1317,7 +1317,11 @@ static int vega12_read_sensor(struct pp_hwmgr *hwmgr, int idx,
break;
case AMDGPU_PP_SENSOR_GPU_POWER:
ret = vega12_get_gpu_power(hwmgr, (uint32_t *)value);
-
+ break;
+ case AMDGPU_PP_SENSOR_ENABLED_SMC_FEATURES_MASK:
+ ret = vega12_get_enabled_smc_features(hwmgr, (uint64_t *)value);
+ if (!ret)
+ *size = 8;
break;
default:
ret = -EINVAL;