drm/amdgpu/powerplay/smu7: enable AVFS control via ppfeaturemask
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 10 Aug 2018 18:19:26 +0000 (13:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:10:17 +0000 (11:10 -0500)
Allow the user to disable AFVS via ppfeaturemask for debugging.

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c

index a029e47c2319c5cf4804b9486cae02992d26e055..186dafc7f166e1ede237051c7ff691dbc811c3d5 100644 (file)
@@ -620,7 +620,8 @@ int smu7_init(struct pp_hwmgr *hwmgr)
                return -EINVAL;
        }
 
-       if (smum_is_hw_avfs_present(hwmgr))
+       if (smum_is_hw_avfs_present(hwmgr) &&
+           (hwmgr->feature_mask & PP_AVFS_MASK))
                hwmgr->avfs_supported = true;
 
        return 0;