aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-09-20 22:36:38 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-09-26 21:09:11 -0500
commit39a8a0db838788bed487bea6e2276a3d0da76eea (patch)
tree47a3bcc27e361f5ff88b4a513f1b10b67072d18d /drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
parentdrm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega12 (diff)
downloadlinux-dev-39a8a0db838788bed487bea6e2276a3d0da76eea.tar.xz
linux-dev-39a8a0db838788bed487bea6e2276a3d0da76eea.zip
drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega20
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/vega20_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index 260e0e48dcd6..2a554f9edcda 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -1941,6 +1941,11 @@ static int vega20_read_sensor(struct pp_hwmgr *hwmgr, int idx,
*size = 16;
ret = vega20_get_gpu_power(hwmgr, (uint32_t *)value);
break;
+ case AMDGPU_PP_SENSOR_ENABLED_SMC_FEATURES_MASK:
+ ret = vega20_get_enabled_smc_features(hwmgr, (uint64_t *)value);
+ if (!ret)
+ *size = 8;
+ break;
default:
ret = -EINVAL;
break;