[PATCH] drm/amd/powerplay: skip disable dynamic state management

Feng, Kenneth Kenneth.Feng at amd.com
Wed Dec 18 10:29:58 UTC 2019


[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Kenneth Feng <kenneth.feng at amd.com>


-----Original Message-----
From: Yintian Tao <yttao at amd.com> 
Sent: Wednesday, December 18, 2019 6:15 PM
To: Feng, Kenneth <Kenneth.Feng at amd.com>
Cc: amd-gfx at lists.freedesktop.org; Tao, Yintian <Yintian.Tao at amd.com>
Subject: [PATCH] drm/amd/powerplay: skip disable dynamic state management

Under sriov, the disable operation is no allowed.

Signed-off-by: Yintian Tao <yttao at amd.com>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index 253860d30b20..9454ab50f9a1 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -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;
-- 
2.17.1


More information about the amd-gfx mailing list