mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
drm/amd/display: Toggle for Disable Force Pstate Allow on Disable
[Why & How] In theory, driver should be able to support disabling force pstate allow after hardware release however this behavior is not tested yet. Introducing a new toggle to disable the force on the fly. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Ryan Seto <ryanseto@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1073,6 +1073,7 @@ struct dc_debug_options {
|
||||
unsigned int force_mall_ss_num_ways;
|
||||
bool alloc_extra_way_for_cursor;
|
||||
uint32_t subvp_extra_lines;
|
||||
bool disable_force_pstate_allow_on_hw_release;
|
||||
bool force_usr_allow;
|
||||
/* uses value at boot and disables switch */
|
||||
bool disable_dtb_ref_clk_switch;
|
||||
|
||||
@@ -1621,20 +1621,28 @@ void dcn401_unblank_stream(struct pipe_ctx *pipe_ctx,
|
||||
|
||||
void dcn401_hardware_release(struct dc *dc)
|
||||
{
|
||||
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
|
||||
if (!dc->debug.disable_force_pstate_allow_on_hw_release) {
|
||||
dc_dmub_srv_fams2_update_config(dc, dc->current_state, false);
|
||||
|
||||
/* If pstate unsupported, or still supported
|
||||
* by firmware, force it supported by dcn
|
||||
*/
|
||||
if (dc->current_state) {
|
||||
if ((!dc->clk_mgr->clks.p_state_change_support ||
|
||||
dc->current_state->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) &&
|
||||
dc->res_pool->hubbub->funcs->force_pstate_change_control)
|
||||
dc->res_pool->hubbub->funcs->force_pstate_change_control(
|
||||
dc->res_pool->hubbub, true, true);
|
||||
/* If pstate unsupported, or still supported
|
||||
* by firmware, force it supported by dcn
|
||||
*/
|
||||
if (dc->current_state) {
|
||||
if ((!dc->clk_mgr->clks.p_state_change_support ||
|
||||
dc->current_state->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) &&
|
||||
dc->res_pool->hubbub->funcs->force_pstate_change_control)
|
||||
dc->res_pool->hubbub->funcs->force_pstate_change_control(
|
||||
dc->res_pool->hubbub, true, true);
|
||||
|
||||
dc->current_state->bw_ctx.bw.dcn.clk.p_state_change_support = true;
|
||||
dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true);
|
||||
dc->current_state->bw_ctx.bw.dcn.clk.p_state_change_support = true;
|
||||
dc->clk_mgr->funcs->update_clocks(dc->clk_mgr, dc->current_state, true);
|
||||
}
|
||||
} else {
|
||||
if (dc->current_state) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -708,6 +708,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
||||
},
|
||||
.use_max_lb = true,
|
||||
.force_disable_subvp = false,
|
||||
.disable_force_pstate_allow_on_hw_release = false,
|
||||
.exit_idle_opt_for_cursor_updates = true,
|
||||
.using_dml2 = true,
|
||||
.using_dml21 = true,
|
||||
|
||||
Reference in New Issue
Block a user