mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/amd/display: Fix DPMS using partially updated pipe context
[Why & How] DPMS functions should not use partially updated pipe context passed as argument of commit_planes_do_stream_update, and instead use the one in current_state, which is guaranteed to be the most recently programmed HW config. Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
544780573c
commit
6fd45b5d89
|
|
@ -3897,27 +3897,34 @@ static void commit_planes_do_stream_update(struct dc *dc,
|
|||
resource_build_test_pattern_params(&context->res_ctx, pipe_ctx);
|
||||
}
|
||||
|
||||
// DPMS should not use partially updated pipe context
|
||||
struct pipe_ctx *dpms_pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[j];
|
||||
|
||||
if (stream_update->dpms_off) {
|
||||
if (*stream_update->dpms_off) {
|
||||
dc->link_srv->set_dpms_off(pipe_ctx);
|
||||
dc->link_srv->set_dpms_off(dpms_pipe_ctx);
|
||||
/* for dpms, keep acquired resources*/
|
||||
if (pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only)
|
||||
pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);
|
||||
if (dpms_pipe_ctx->stream_res.audio && !dc->debug.az_endpoint_mute_only) {
|
||||
struct audio *audio = dpms_pipe_ctx->stream_res.audio;
|
||||
|
||||
audio->funcs->az_disable(audio);
|
||||
}
|
||||
|
||||
dc->optimized_required = true;
|
||||
|
||||
} else {
|
||||
if (get_seamless_boot_stream_count(context) == 0)
|
||||
dc->hwss.prepare_bandwidth(dc, dc->current_state);
|
||||
dc->link_srv->set_dpms_on(dc->current_state, pipe_ctx);
|
||||
dc->link_srv->set_dpms_on(dc->current_state, dpms_pipe_ctx);
|
||||
}
|
||||
} else if (pipe_ctx->stream->link->wa_flags.blank_stream_on_ocs_change && stream_update->output_color_space
|
||||
&& !stream->dpms_off && dc_is_dp_signal(pipe_ctx->stream->signal)) {
|
||||
} else if (dpms_pipe_ctx->stream->link->wa_flags.blank_stream_on_ocs_change &&
|
||||
stream_update->output_color_space &&
|
||||
!stream->dpms_off && dc_is_dp_signal(dpms_pipe_ctx->stream->signal)) {
|
||||
/*
|
||||
* Workaround for firmware issue in some receivers where they don't pick up
|
||||
* correct output color space unless DP link is disabled/re-enabled
|
||||
*/
|
||||
dc->link_srv->set_dpms_on(dc->current_state, pipe_ctx);
|
||||
dc->link_srv->set_dpms_on(dc->current_state, dpms_pipe_ctx);
|
||||
}
|
||||
|
||||
if (stream_update->abm_level && pipe_ctx->stream_res.abm) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user