drm/amd/powerplay: skip disable dynamic state management
authorYintian Tao <yttao@amd.com>
Wed, 18 Dec 2019 10:11:57 +0000 (18:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Dec 2019 15:10:05 +0000 (10:10 -0500)
Under sriov, the disable operation is no allowed.

Signed-off-by: Yintian Tao <yttao@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c

index 253860d..9454ab5 100644 (file)
@@ -99,6 +99,9 @@ int phm_disable_dynamic_state_management(struct pp_hwmgr *hwmgr)
 
        PHM_FUNC_CHECK(hwmgr);
 
+       if (!hwmgr->not_vf)
+               return 0;
+
        if (!smum_is_dpm_running(hwmgr)) {
                pr_info("dpm has been disabled\n");
                return 0;