Skip to content

Commit 48e48e5

Browse files
Zhan Liualexdeucher
authored andcommitted
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: Zhan Liu <zhan.liu@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent bd80d58 commit 48e48e5

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

‎drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -690,26 +690,23 @@ void dcn30_program_dmdata_engine(struct pipe_ctx *pipe_ctx)
690690

691691
bool dcn30_apply_idle_power_optimizations(struct dc *dc, bool enable)
692692
{
693-
unsigned int surface_size;
694-
695693
if (!dc->ctx->dmub_srv)
696694
return false;
697695

698696
if (enable) {
699-
if (dc->current_state
700-
&& dc->current_state->stream_count == 1 // single display only
701-
&& dc->current_state->stream_status[0].plane_count == 1 // single surface only
702-
&& dc->current_state->stream_status[0].plane_states[0]->address.page_table_base.quad_part == 0 // no VM
703-
// Only 8 and 16 bit formats
704-
&& dc->current_state->stream_status[0].plane_states[0]->format <= SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F
705-
&& dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB8888) {
706-
707-
surface_size = dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_pitch *
708-
dc->current_state->stream_status[0].plane_states[0]->plane_size.surface_size.height *
709-
(dc->current_state->stream_status[0].plane_states[0]->format >= SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616 ? 8 : 4);
710-
697+
if (dc->current_state) {
698+
int i;
699+
700+
/* First, check no-memory-requests case */
701+
for (i = 0; i < dc->current_state->stream_count; i++) {
702+
if (dc->current_state->stream_status[i]
703+
.plane_count)
704+
/* Fail eligibility on a visible stream */
705+
break;
706+
}
711707
}
712708

709+
/* No applicable optimizations */
713710
return false;
714711
}
715712

0 commit comments

Comments
 (0)