]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: implement ENABLED_SMC_FEATURES_MASK sensor for vega12
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Sep 2018 03:36:23 +0000 (22:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Sep 2018 02:09:11 +0000 (21:09 -0500)
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>
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c

index de81abfbf4f174150cfc60bacf89bed358abdde2..9600e2f226e98e2be4d647d839bd98aef883de30 100644 (file)
@@ -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;