diff options
| author | Hawking Zhang <[email protected]> | 2022-01-23 11:12:30 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-05-04 13:57:35 +0000 |
| commit | f0b0a1b8062dba25cfe632582c92c047242598b2 (patch) | |
| tree | 19c9373031669cb33bfdf059e217758fd3df840e /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |
| parent | drm/amdgpu: add updated smu_info structures (diff) | |
| download | kernel-f0b0a1b8062dba25cfe632582c92c047242598b2.tar.gz kernel-f0b0a1b8062dba25cfe632582c92c047242598b2.zip | |
drm/amdgpu: query core refclk from bios for smu v13
The smu_info structrue for smu v13 is changed that
core_refclk in v31 strucuture is not correct for
smu v13_0_0
Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Likun Gao <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index 494ca6a0f47a..63e0293edc5f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c @@ -556,6 +556,7 @@ bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev, union smu_info { struct atom_smu_info_v3_1 v31; + struct atom_smu_info_v4_0 v40; }; union gfx_info { @@ -602,7 +603,10 @@ int amdgpu_atomfirmware_get_clock_info(struct amdgpu_device *adev) data_offset); /* system clock */ - spll->reference_freq = le32_to_cpu(smu_info->v31.core_refclk_10khz); + if (frev == 3) + spll->reference_freq = le32_to_cpu(smu_info->v31.core_refclk_10khz); + else if (frev == 4) + spll->reference_freq = le32_to_cpu(smu_info->v40.core_refclk_10khz); spll->reference_div = 0; spll->min_post_div = 1; |
