diff options
author | Yintian Tao <yttao@amd.com> | 2018-08-19 23:11:48 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-21 15:18:21 -0400 |
commit | 11a88c2e92feca1ed3fba19fa375f76d3c75f5d5 (patch) | |
tree | 5d9016d01fdd814bae8cd16d48f6d0fed2cfc74b | |
parent | fa1d04e9a896c468f0882425f5ba452a4b424108 (diff) |
drm/powerplay: enable dpm under pass-through
Repeat enable dpm under pass-through because there is no actually
hardware-fini and real power-off when guest vm shutdown or reboot.
Otherwise, under pass-through it will be failed to populate populate
and upload SCLK MCLK DPM levels due to zero of pcie_speed_table.count.
Signed-off-by: Yintian Tao <yttao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index 53207e76b0f3..6ef3c875fedd 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | |||
@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr, | |||
75 | 75 | ||
76 | int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr) | 76 | int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr) |
77 | { | 77 | { |
78 | struct amdgpu_device *adev = NULL; | ||
78 | int ret = -EINVAL;; | 79 | int ret = -EINVAL;; |
79 | PHM_FUNC_CHECK(hwmgr); | 80 | PHM_FUNC_CHECK(hwmgr); |
81 | adev = hwmgr->adev; | ||
80 | 82 | ||
81 | if (smum_is_dpm_running(hwmgr)) { | 83 | if (smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)) { |
82 | pr_info("dpm has been enabled\n"); | 84 | pr_info("dpm has been enabled\n"); |
83 | return 0; | 85 | return 0; |
84 | } | 86 | } |