Skip to content
/ linux Public

Commit 79c5cbe

Browse files
Dillon VaroneSasha Levin
authored andcommitted
drm/amd/display: Guard FAMS2 configuration updates
[ Upstream commit 7dedb90 ] [WHY&HOW] If DMCUB is not initialized or FAMS2 is not supported, the interface should not be called. Reviewed-by: Sridevi Arvindekar <sridevi.arvindekar@amd.com> Signed-off-by: Dillon Varone <Dillon.Varone@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7ad1f6f commit 79c5cbe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,8 @@ void dcn401_unblank_stream(struct pipe_ctx *pipe_ctx,
16281628
void dcn401_hardware_release(struct dc *dc)
16291629
{
16301630
if (!dc->debug.disable_force_pstate_allow_on_hw_release) {
1631-
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
1631+
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
1632+
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
16321633

16331634
/* If pstate unsupported, or still supported
16341635
* by firmware, force it supported by dcn
@@ -1648,7 +1649,9 @@ void dcn401_hardware_release(struct dc *dc)
16481649
dc->clk_mgr->clks.p_state_change_support = false;
16491650
dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true);
16501651
}
1651-
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
1652+
1653+
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
1654+
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
16521655
}
16531656
}
16541657

0 commit comments

Comments
 (0)