Skip to content

Commit 5a328de

Browse files
Rodrigo Siqueiragregkh
authored andcommitted
drm/amd/display: Check clock table return
[ Upstream commit 4b4f21f ] During the load processes for Renoir, our display code needs to retrieve the SMU clock and voltage table, however, this operation can fail which means that we have to check this scenario. Currently, we are not handling this case properly and as a result, we have seen the following dmesg log during the boot: RIP: 0010:rn_clk_mgr_construct+0x129/0x3d0 [amdgpu] ... Call Trace: dc_clk_mgr_create+0x16a/0x1b0 [amdgpu] dc_create+0x231/0x760 [amdgpu] This commit fixes this issue by checking the return status retrieved from the clock table before try to populate any bandwidth. Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0018d02 commit 5a328de

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,7 @@ void rn_clk_mgr_construct(
761761
{
762762
struct dc_debug_options *debug = &ctx->dc->debug;
763763
struct dpm_clocks clock_table = { 0 };
764+
enum pp_smu_status status = 0;
764765

765766
clk_mgr->base.ctx = ctx;
766767
clk_mgr->base.funcs = &dcn21_funcs;
@@ -817,8 +818,10 @@ void rn_clk_mgr_construct(
817818
clk_mgr->base.bw_params = &rn_bw_params;
818819

819820
if (pp_smu && pp_smu->rn_funcs.get_dpm_clock_table) {
820-
pp_smu->rn_funcs.get_dpm_clock_table(&pp_smu->rn_funcs.pp_smu, &clock_table);
821-
if (ctx->dc_bios && ctx->dc_bios->integrated_info) {
821+
status = pp_smu->rn_funcs.get_dpm_clock_table(&pp_smu->rn_funcs.pp_smu, &clock_table);
822+
823+
if (status == PP_SMU_RESULT_OK &&
824+
ctx->dc_bios && ctx->dc_bios->integrated_info) {
822825
rn_clk_mgr_helper_populate_bw_params (clk_mgr->base.bw_params, &clock_table, ctx->dc_bios->integrated_info);
823826
}
824827
}

0 commit comments

Comments
 (0)