mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
drm/amd/display: Do not set drr on pipe commit
[WHY]
Writing to DRR registers such as OTG_V_TOTAL_MIN on the same frame as a
pipe commit can cause underflow.
[HOW]
Move DMUB p-state delegate into optimze_bandwidth; enabling FAMS sets
optimized_required.
This change expects that Freesync requests are blocked when
optimized_required is true.
Fixes: 613a7956de ("drm/amd/display: Add monitor specific edid quirk")
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
08e8521576
commit
09c8cbedba
@@ -2123,6 +2123,12 @@ void dcn20_optimize_bandwidth(
|
|||||||
if (hubbub->funcs->program_compbuf_size)
|
if (hubbub->funcs->program_compbuf_size)
|
||||||
hubbub->funcs->program_compbuf_size(hubbub, context->bw_ctx.bw.dcn.compbuf_size_kb, true);
|
hubbub->funcs->program_compbuf_size(hubbub, context->bw_ctx.bw.dcn.compbuf_size_kb, true);
|
||||||
|
|
||||||
|
if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {
|
||||||
|
dc_dmub_srv_p_state_delegate(dc,
|
||||||
|
true, context);
|
||||||
|
context->bw_ctx.bw.dcn.clk.p_state_change_support = true;
|
||||||
|
}
|
||||||
|
|
||||||
dc->clk_mgr->funcs->update_clocks(
|
dc->clk_mgr->funcs->update_clocks(
|
||||||
dc->clk_mgr,
|
dc->clk_mgr,
|
||||||
context,
|
context,
|
||||||
|
|||||||
@@ -951,11 +951,18 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,
|
|||||||
void dcn30_prepare_bandwidth(struct dc *dc,
|
void dcn30_prepare_bandwidth(struct dc *dc,
|
||||||
struct dc_state *context)
|
struct dc_state *context)
|
||||||
{
|
{
|
||||||
|
if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {
|
||||||
|
dc->optimized_required = true;
|
||||||
|
context->bw_ctx.bw.dcn.clk.p_state_change_support = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (dc->clk_mgr->dc_mode_softmax_enabled)
|
if (dc->clk_mgr->dc_mode_softmax_enabled)
|
||||||
if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 &&
|
if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 &&
|
||||||
context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000)
|
context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000)
|
||||||
dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz);
|
dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz);
|
||||||
|
|
||||||
dcn20_prepare_bandwidth(dc, context);
|
dcn20_prepare_bandwidth(dc, context);
|
||||||
|
|
||||||
|
dc_dmub_srv_p_state_delegate(dc, false, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user