drm/amdgpu: modify system reference clock source for navi+ (V2)
Subsystems (2)
PATCH 1/1 drm/amdgpu: modify system reference clock source for navi+ (V2)
Starting from Navi+, the rlc reference clock is used for system clock from vbios gfx_info table. It is incorrect to use core_refclk_10khz of vbios smu_info table as system clock.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +15 -0
@@ -546,6 +546,21 @@ int amdgpu_atomfirmware_get_clock_info(struct amdgpu_device *adev) ret =0 ; } +/* if asic is Navi+, the rlc reference clock is used for system clock +* from vbios gfx_info table */ +if (adev->asic_type >=CHIP_NAVI10 ) { + index =get_index_into_master_table (atom_master_list_of_data_tables_v2_1, + gfx_info); +if (amdgpu_atom_parse_data_header (mode_info->atom_context, index,NULL , + &frev, &crev, &data_offset)) { +struct atom_gfx_info_v2_2 *gfx_info = (struct atom_gfx_info_v2_2 *) + (mode_info->atom_context->bios + data_offset); +if ((frev ==2 ) && (crev >=2 )) + spll->reference_freq =le32_to_cpu (gfx_info->rlc_gpu_timer_refclk); + ret =0 ; + } + } +return ret; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 6 lines · Aaron Liu
Starting from Navi+, the rlc reference clock is used for system clock from vbios
gfx_infotable. It is incorrect to usecore_refclk_10khzof vbiossmu_infotable as system clock.Signed-off-by Aaron Liu <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +15
-1@@ -546,6 +546,21 @@ int amdgpu_atomfirmware_get_clock_info(struct amdgpu_device *adev) ret =0 ; } +/* if asic is Navi+, the rlc reference clock is used for system clock +* from vbios gfx_info table */ +if (adev->asic_type >=CHIP_NAVI10 ) { + index =get_index_into_master_table (atom_master_list_of_data_tables_v2_1, + gfx_info); +if (amdgpu_atom_parse_data_header (mode_info->atom_context, index,NULL , + &frev, &crev, &data_offset)) { +struct atom_gfx_info_v2_2 *gfx_info = (struct atom_gfx_info_v2_2 *) + (mode_info->atom_context->bios + data_offset); +if ((frev ==2 ) && (crev >=2 )) + spll->reference_freq =le32_to_cpu (gfx_info->rlc_gpu_timer_refclk); + ret =0 ; + } + } +return ret; } --2.25.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
-----Original Message-----
From: Liu, Aaron <[email protected]>
Sent: Tuesday, May 18, 2021 10:16 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Huang, Ray <[email protected]>; Wang, Kevin(Yang) <[email protected]>; Liu, Aaron <[email protected]>
Subject: [PATCH] drm/amdgpu: modify system reference clock source for navi+ (V2)
Starting from Navi+, the rlc reference clock is used for system clock from vbios gfx_info table. It is incorrect to use core_refclk_10khz of vbios smu_info table as system clock.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +15 -0
@@ -546,6 +546,21 @@ int amdgpu_atomfirmware_get_clock_info(struct amdgpu_device *adev) ret =0 ; } +/* if asic is Navi+, the rlc reference clock is used for system clock +* from vbios gfx_info table */ +if (adev->asic_type >=CHIP_NAVI10 ) { + index =get_index_into_master_table (atom_master_list_of_data_tables_v2_1, + gfx_info); +if (amdgpu_atom_parse_data_header (mode_info->atom_context, index,NULL , + &frev, &crev, &data_offset)) { +struct atom_gfx_info_v2_2 *gfx_info = (struct atom_gfx_info_v2_2 *) + (mode_info->atom_context->bios + data_offset); +if ((frev ==2 ) && (crev >=2 )) + spll->reference_freq =le32_to_cpu (gfx_info->rlc_gpu_timer_refclk); + ret =0 ; + } + } +return ret; }
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx