drm/powerplay: enable dpm under pass-through
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +3 -1
@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,int phm_enable_dynamic_state_management (struct pp_hwmgr *hwmgr) { +struct amdgpu_device *adev =NULL ;int ret = -EINVAL ;;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" );return 0 ; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1534736393-23259-1-git-send-email-yttao-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Yintian Tao <[email protected]>
Sent: Sunday, August 19, 2018 11:39:53 PM
To: [email protected]
Cc: Tao, Yintian
Subject: [PATCH] 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.
--- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +3 -1
@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,int phm_enable_dynamic_state_management (struct pp_hwmgr *hwmgr) { +struct amdgpu_device *adev =NULL ;int ret = -EINVAL ;;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" );return 0 ; }
--
2.7.4
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Zhang, Jerry (Junwei)
Acked-by Junwei ZhangQuoted 3 lines · Yintian Tao
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
duplicate "populate"
Quoted 13 lines
and upload SCLK MCLK DPM levels due to zero of pcie_speed_table.count.
Change-Id I7cbc55c650867d00e19241ceea5d98f78b5ac3f5Signed-off-by Yintian Tao <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +0
-0
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c int phm_set_power_state(struct pp_hwmgr *hwmgr, · line 81
Quoted 7 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +2
-0@@ -75,10 +75,12 @@ int phm_set_power_state(struct pp_hwmgr *hwmgr,int phm_enable_dynamic_state_management (struct pp_hwmgr *hwmgr) { +struct amdgpu_device *adev =NULL ;int ret = -EINVAL ;;PHM_FUNC_CHECK (hwmgr); + adev = hwmgr->adev;
It could be simplified as
struct amdgpu_device *adev = hwmgr->adev;
or use that directly
amdgpu_passthrough(hwmgr->adev)
apart from that,
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c int phm_set_power_state(struct pp_hwmgr *hwmgr,
Quoted 7 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +1
-1-if (smum_is_dpm_running (hwmgr)) { +if (smum_is_dpm_running (hwmgr) && !amdgpu_passthrough (adev)) {pr_info ("dpm has been enabled\n" );return 0 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx