[PATCH] drm/amd/pm: support runtime pptable update for sienna_cichlid etc.

Quan, Evan Evan.Quan at amd.com
Mon Sep 14 08:21:56 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Better to split this into two patches: one for the dpm disablement skipping and another for gfxoff ctrl.
Either way this patch is reviewed-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: Jiansong Chen <Jiansong.Chen at amd.com>
Sent: Monday, September 14, 2020 4:10 PM
To: amd-gfx at lists.freedesktop.org
Cc: Zhou1, Tao <Tao.Zhou1 at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>; Quan, Evan <Evan.Quan at amd.com>; Chen, Jiansong (Simon) <Jiansong.Chen at amd.com>
Subject: [PATCH] drm/amd/pm: support runtime pptable update for sienna_cichlid etc.

This avoids smu issue when enabling runtime pptable update for
sienna_cichlid and so on. Runtime pptable udpate is needed for test
and debug purpose.

Signed-off-by: Jiansong Chen <Jiansong.Chen at amd.com>
Change-Id: I70b704ab4d6efd169f579c392e5dbc2737dc1fb2
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 7a55ece1f124..7618f9972b8c 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1129,7 +1129,7 @@ static int smu_disable_dpms(struct smu_context *smu)
  */
 if (smu->uploading_custom_pp_table &&
     (adev->asic_type >= CHIP_NAVI10) &&
-    (adev->asic_type <= CHIP_NAVI12))
+    (adev->asic_type <= CHIP_NAVY_FLOUNDER))
 return 0;

 /*
@@ -1214,7 +1214,9 @@ static int smu_hw_fini(void *handle)
 int smu_reset(struct smu_context *smu)
 {
 struct amdgpu_device *adev = smu->adev;
-int ret = 0;
+int ret;
+
+amdgpu_gfx_off_ctrl(smu->adev, false);

 ret = smu_hw_fini(adev);
 if (ret)
@@ -1225,8 +1227,12 @@ int smu_reset(struct smu_context *smu)
 return ret;

 ret = smu_late_init(adev);
+if (ret)
+return ret;

-return ret;
+amdgpu_gfx_off_ctrl(smu->adev, true);
+
+return 0;
 }

 static int smu_suspend(void *handle)
--
2.25.1



More information about the amd-gfx mailing list