mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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>
This commit is contained in:
parent
fa1d04e9a8
commit
11a88c2e92
1 changed files with 3 additions and 1 deletions
|
@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,
|
||||||
|
|
||||||
int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
|
int phm_enable_dynamic_state_management(struct pp_hwmgr *hwmgr)
|
||||||
{
|
{
|
||||||
|
struct amdgpu_device *adev = NULL;
|
||||||
int ret = -EINVAL;;
|
int ret = -EINVAL;;
|
||||||
PHM_FUNC_CHECK(hwmgr);
|
PHM_FUNC_CHECK(hwmgr);
|
||||||
|
adev = hwmgr->adev;
|
||||||
|
|
||||||
if (smum_is_dpm_running(hwmgr)) {
|
if (smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev)) {
|
||||||
pr_info("dpm has been enabled\n");
|
pr_info("dpm has been enabled\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue