Commit 20ea30a7 authored by Ryan Seto's avatar Ryan Seto Committed by Alex Deucher
Browse files

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: default avatarDillon Varone <dillon.varone@amd.com>
Signed-off-by: default avatarRyan Seto <ryanseto@amd.com>
Signed-off-by: default avatarRoman Li <roman.li@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e63e9f8b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
+22 −14
Original line number Diff line number Diff line
@@ -1621,6 +1621,7 @@ 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 pstate unsupported, or still supported
@@ -1636,6 +1637,13 @@ void dcn401_hardware_release(struct dc *dc)
			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);
	}
}

void dcn401_wait_for_det_buffer_update_under_otg_master(struct dc *dc, struct dc_state *context, struct pipe_ctx *otg_master)
+1 −0
Original line number Diff line number Diff line
@@ -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,