summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2023-02-21 15:21:19 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-02-23 17:35:59 -0500
commit6761c4bfee681c306bbe6599951e74826660be47 (patch)
treecd1aa81d4f8264c737c0e92d0fae72f38a313c36 /drivers/gpu/drm
parentedddc6fd542ffbae680c2201bbf6763f1693db4f (diff)
downloadlinux-stable-6761c4bfee681c306bbe6599951e74826660be47.tar.gz
linux-stable-6761c4bfee681c306bbe6599951e74826660be47.tar.bz2
linux-stable-6761c4bfee681c306bbe6599951e74826660be47.zip
drm/amd/pm: no pptable resetup on runpm exiting
It is assumed the pptable used before runpm is same as the one used afterwards. Thus, we can reuse the stored copy and do not need to resetup the pptable again. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Feifei Xu <feifei.xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 834d146c4991..0652b001ad54 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1202,10 +1202,17 @@ static int smu_smc_hw_setup(struct smu_context *smu)
return ret;
}
- ret = smu_setup_pptable(smu);
- if (ret) {
- dev_err(adev->dev, "Failed to setup pptable!\n");
- return ret;
+ /*
+ * It is assumed the pptable used before runpm is same as
+ * the one used afterwards. Thus, we can reuse the stored
+ * copy and do not need to resetup the pptable again.
+ */
+ if (!adev->in_runpm) {
+ ret = smu_setup_pptable(smu);
+ if (ret) {
+ dev_err(adev->dev, "Failed to setup pptable!\n");
+ return ret;
+ }
}
/* smu_dump_pptable(smu); */