Skip to content

Commit 747bfca

Browse files
Zhongwei Zhangalexdeucher
authored andcommitted
drm/amd/display: Avoid calling blank_stream() twice
[Why] We've made fix for garbage in dcn31_reset_back_end_for_pipe(), adding blank_stream() before disable_crtc(). And set_dpms_off() will call blank_stream() again. [How] Add flag to avoid calling blank_stream() twice. Reviewed-by: Nicholas Kazlauskas <[email protected]> Signed-off-by: Zhongwei Zhang <[email protected]> Signed-off-by: Wayne Lin <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 893f074 commit 747bfca

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,9 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
12211221
struct dc_link *link = stream->link;
12221222
struct dce_hwseq *hws = link->dc->hwseq;
12231223

1224+
if (hws && hws->wa_state.skip_blank_stream)
1225+
return;
1226+
12241227
if (link->local_sink && link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
12251228
if (!link->skip_implict_edp_power_control)
12261229
hws->funcs.edp_backlight_control(link, false);

drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,15 @@ static void dcn31_reset_back_end_for_pipe(
526526

527527
link = pipe_ctx->stream->link;
528528

529+
if (dc->hwseq)
530+
dc->hwseq->wa_state.skip_blank_stream = false;
531+
529532
if ((!pipe_ctx->stream->dpms_off || link->link_status.link_active) &&
530-
(link->connector_signal == SIGNAL_TYPE_EDP))
533+
(link->connector_signal == SIGNAL_TYPE_EDP)) {
531534
dc->hwss.blank_stream(pipe_ctx);
535+
if (dc->hwseq)
536+
dc->hwseq->wa_state.skip_blank_stream = true;
537+
}
532538

533539
pipe_ctx->stream_res.tg->funcs->set_dsc_config(
534540
pipe_ctx->stream_res.tg,
@@ -570,7 +576,8 @@ static void dcn31_reset_back_end_for_pipe(
570576
pipe_ctx->stream_res.audio = NULL;
571577
}
572578
}
573-
579+
if (dc->hwseq)
580+
dc->hwseq->wa_state.skip_blank_stream = false;
574581
pipe_ctx->stream = NULL;
575582
DC_LOG_DEBUG("Reset back end for pipe %d, tg:%d\n",
576583
pipe_ctx->pipe_idx, pipe_ctx->stream_res.tg->inst);

drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct hwseq_wa_state {
4949
bool DEGVIDCN10_253_applied;
5050
bool disallow_self_refresh_during_multi_plane_transition_applied;
5151
unsigned int disallow_self_refresh_during_multi_plane_transition_applied_on_frame;
52+
bool skip_blank_stream;
5253
};
5354

5455
struct pipe_ctx;

0 commit comments

Comments
 (0)