mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 00:06:36 +00:00
drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init
Since DAL settings come between .hw_init and .late_init of SMU. And DAL needs to know the maximum sustainable clocks. Signed-off-by: Evan Quan <evan.quan@amd.com> Reported-and-Tested-by: Flora Cui <flora.cui@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
549db52682
commit
10eafd3e56
1 changed files with 13 additions and 6 deletions
|
@ -819,12 +819,6 @@ static int smu_late_init(void *handle)
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_init_max_sustainable_clocks(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to init max sustainable clocks!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_populate_umd_state_clk(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to populate UMD state clocks!\n");
|
||||
|
@ -1364,6 +1358,19 @@ static int smu_hw_init(void *handle)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move maximum sustainable clock retrieving here considering
|
||||
* 1. It is not needed on resume(from S3).
|
||||
* 2. DAL settings come between .hw_init and .late_init of SMU.
|
||||
* And DAL needs to know the maximum sustainable clocks. Thus
|
||||
* it cannot be put in .late_init().
|
||||
*/
|
||||
ret = smu_init_max_sustainable_clocks(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to init max sustainable clocks!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
adev->pm.dpm_enabled = true;
|
||||
|
||||
dev_info(adev->dev, "SMU is initialized successfully!\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue