Commit 48e48e59 authored by Zhan Liu's avatar Zhan Liu Committed by Alex Deucher

drm/amd/display: Disable idle optimization when PSR is enabled

[Why]
Idle optimization and PSR conflict each other. If both enabled
at the same time, display flickering will be observed.

[How]
Disable idle optimization when PSR is enabled.
Signed-off-by: default avatarZhan Liu <zhan.liu@amd.com>
Acked-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bd80d584
...@@ -690,26 +690,23 @@ void dcn30_program_dmdata_engine(struct pipe_ctx *pipe_ctx) ...@@ -690,26 +690,23 @@ void dcn30_program_dmdata_engine(struct pipe_ctx *pipe_ctx)
bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable) bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
{ {
unsigned int surface_size;
if (!dc->ctx->dmub_srv) if (!dc->ctx->dmub_srv)
return false; return false;
if (enable) { if (enable) {
if (dc->current_state if (dc->current_state) {
&& dc->current_state->stream_count == 1 // single display only int i;
&& dc->current_state->stream_status[0].plane_count == 1 // single surface only
&& dc->current_state->stream_status[0].plane_states[0]->address.page_table_base.quad_part == 0 // no VM /* First, check no-memory-requests case */
// Only 8 and 16 bit formats for (i = 0; i < dc->current_state->stream_count; i++) {
&& dc->current_state->stream_status[0].plane_states[0]->format <= SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F if (dc->current_state->stream_status[i]
&& dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB8888) { .plane_count)
/* Fail eligibility on a visible stream */
surface_size = dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_pitch * break;
dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_size.height * }
(dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ? 8 : 4);
} }
/* No applicable optimizations */
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment