Skip to content

Commit

Permalink
drm/amd/pm: no pptable resetup on runpm exiting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Evan Quan authored and Alex Deucher committed Feb 23, 2023
1 parent edddc6f commit 6761c4b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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); */
Expand Down

0 comments on commit 6761c4b

Please sign in to comment.