mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-17 00:46:26 -05:00
drm/amd/display: Remove wm_optimized_required
[WHY&HOW] This is a redundant field that is identically to optimized_required, so just replace it. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Dillon Varone <Dillon.Varone@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
c480d074b3
commit
19d8f3192f
@@ -460,7 +460,7 @@ bool dc_stream_adjust_vmin_vmax(struct dc *dc,
|
||||
* avoid conflicting with firmware updates.
|
||||
*/
|
||||
if (dc->ctx->dce_version > DCE_VERSION_MAX) {
|
||||
if ((dc->optimized_required || dc->wm_optimized_required) &&
|
||||
if (dc->optimized_required &&
|
||||
(stream->adjust.v_total_max != adjust->v_total_max ||
|
||||
stream->adjust.v_total_min != adjust->v_total_min)) {
|
||||
stream->adjust.timing_adjust_pending = true;
|
||||
@@ -2577,7 +2577,6 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
|
||||
}
|
||||
|
||||
dc->optimized_required = false;
|
||||
dc->wm_optimized_required = false;
|
||||
}
|
||||
|
||||
bool dc_set_generic_gpio_for_stereo(bool enable,
|
||||
@@ -3056,8 +3055,6 @@ enum surface_update_type dc_check_update_surfaces_for_stream(
|
||||
} else if (memcmp(&dc->current_state->bw_ctx.bw.dcn.clk, &dc->clk_mgr->clks, offsetof(struct dc_clocks, prev_p_state_change_support)) != 0) {
|
||||
dc->optimized_required = true;
|
||||
}
|
||||
|
||||
dc->optimized_required |= dc->wm_optimized_required;
|
||||
}
|
||||
|
||||
return type;
|
||||
|
||||
@@ -1736,7 +1736,6 @@ struct dc {
|
||||
|
||||
/* Require to optimize clocks and bandwidth for added/removed planes */
|
||||
bool optimized_required;
|
||||
bool wm_optimized_required;
|
||||
bool idle_optimizations_allowed;
|
||||
bool enable_c20_dtm_b0;
|
||||
|
||||
|
||||
@@ -3347,7 +3347,7 @@ void dcn10_prepare_bandwidth(
|
||||
context,
|
||||
false);
|
||||
|
||||
dc->wm_optimized_required = hubbub->funcs->program_watermarks(hubbub,
|
||||
dc->optimized_required = hubbub->funcs->program_watermarks(hubbub,
|
||||
&context->bw_ctx.bw.dcn.watermarks,
|
||||
dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000,
|
||||
true);
|
||||
|
||||
@@ -2390,10 +2390,10 @@ void dcn20_prepare_bandwidth(
|
||||
}
|
||||
|
||||
/* program dchubbub watermarks:
|
||||
* For assigning wm_optimized_required, use |= operator since we don't want
|
||||
* For assigning optimized_required, use |= operator since we don't want
|
||||
* to clear the value if the optimize has not happened yet
|
||||
*/
|
||||
dc->wm_optimized_required |= hubbub->funcs->program_watermarks(hubbub,
|
||||
dc->optimized_required |= hubbub->funcs->program_watermarks(hubbub,
|
||||
&context->bw_ctx.bw.dcn.watermarks,
|
||||
dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000,
|
||||
false);
|
||||
@@ -2406,10 +2406,10 @@ void dcn20_prepare_bandwidth(
|
||||
if (hubbub->funcs->program_compbuf_size) {
|
||||
if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes) {
|
||||
compbuf_size_kb = context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes;
|
||||
dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.dml.ip.min_comp_buffer_size_kbytes);
|
||||
dc->optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.dml.ip.min_comp_buffer_size_kbytes);
|
||||
} else {
|
||||
compbuf_size_kb = context->bw_ctx.bw.dcn.compbuf_size_kb;
|
||||
dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.bw.dcn.compbuf_size_kb);
|
||||
dc->optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.bw.dcn.compbuf_size_kb);
|
||||
}
|
||||
|
||||
hubbub->funcs->program_compbuf_size(hubbub, compbuf_size_kb, false);
|
||||
|
||||
@@ -1383,22 +1383,22 @@ void dcn401_prepare_bandwidth(struct dc *dc,
|
||||
false);
|
||||
|
||||
/* program dchubbub watermarks:
|
||||
* For assigning wm_optimized_required, use |= operator since we don't want
|
||||
* For assigning optimized_required, use |= operator since we don't want
|
||||
* to clear the value if the optimize has not happened yet
|
||||
*/
|
||||
dc->wm_optimized_required |= hubbub->funcs->program_watermarks(hubbub,
|
||||
dc->optimized_required |= hubbub->funcs->program_watermarks(hubbub,
|
||||
&context->bw_ctx.bw.dcn.watermarks,
|
||||
dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000,
|
||||
false);
|
||||
/* update timeout thresholds */
|
||||
if (hubbub->funcs->program_arbiter) {
|
||||
dc->wm_optimized_required |= hubbub->funcs->program_arbiter(hubbub, &context->bw_ctx.bw.dcn.arb_regs, false);
|
||||
dc->optimized_required |= hubbub->funcs->program_arbiter(hubbub, &context->bw_ctx.bw.dcn.arb_regs, false);
|
||||
}
|
||||
|
||||
/* decrease compbuf size */
|
||||
if (hubbub->funcs->program_compbuf_segments) {
|
||||
compbuf_size = context->bw_ctx.bw.dcn.arb_regs.compbuf_size;
|
||||
dc->wm_optimized_required |= (compbuf_size != dc->current_state->bw_ctx.bw.dcn.arb_regs.compbuf_size);
|
||||
dc->optimized_required |= (compbuf_size != dc->current_state->bw_ctx.bw.dcn.arb_regs.compbuf_size);
|
||||
|
||||
hubbub->funcs->program_compbuf_segments(hubbub, compbuf_size, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user