mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amd/pm: setup APU dpm clock table in SMU HW initialization
As the dpm clock table is needed during DC HW initialization.
And that (DC HW initialization) comes before smu_late_init()
where current APU dpm clock table setup is performed. So, NULL
pointer dereference will be triggered. By moving APU dpm clock
table setup to smu_hw_init(), this can be avoided.
Fixes: 02cf91c113
("drm/amd/powerplay: postpone operations not required for hw setup to late_init")
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reported-by: Dirk Gouders <dirk@gouders.net>
Acked-by: Nirmoy Das <nirmoy.das@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
9142c4131a
commit
3cb9d2416c
@ -481,17 +481,6 @@ static int smu_late_init(void *handle)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set initialized values (get from vbios) to dpm tables context such as
|
||||
* gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each
|
||||
* type of clks.
|
||||
*/
|
||||
ret = smu_set_default_dpm_table(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to setup default dpm clock tables!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_populate_umd_state_clk(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to populate UMD state clocks!\n");
|
||||
@ -1030,6 +1019,17 @@ static int smu_smc_hw_setup(struct smu_context *smu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set initialized values (get from vbios) to dpm tables context such as
|
||||
* gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each
|
||||
* type of clks.
|
||||
*/
|
||||
ret = smu_set_default_dpm_table(smu);
|
||||
if (ret) {
|
||||
dev_err(adev->dev, "Failed to setup default dpm clock tables!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_notify_display_change(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user