drm/amd/display: Guard FAMS2 configuration updates

[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>
This commit is contained in:
Dillon Varone 2025-11-18 20:58:23 +00:00 committed by Alex Deucher
parent e4a3133c5b
commit 7dedb906cd

View File

@ -1772,7 +1772,8 @@ void dcn401_unblank_stream(struct pipe_ctx *pipe_ctx,
void dcn401_hardware_release(struct dc *dc)
{
if (!dc->debug.disable_force_pstate_allow_on_hw_release) {
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
/* If pstate unsupported, or still supported
* by firmware, force it supported by dcn
@ -1792,7 +1793,9 @@ void dcn401_hardware_release(struct dc *dc)
dc->clk_mgr->clks.p_state_change_support = false;
dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true);
}
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
}
}