drm/amd/display: Correct output color space during HW reinitialize
authorMichael Mityushkin <michael.mityushkin@amd.com>
Thu, 30 Mar 2023 16:46:58 +0000 (12:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 18 Apr 2023 20:28:53 +0000 (16:28 -0400)
[Why]
Doing core_link_disable_stream or set_dpms_off when reinitializing
hardware causes issue to repro with external display connected. This is
unnecessary, blanking pixel data should be sufficient.

[How]
Call disable_pixel_data while reinitializing hardware instead of
core_link_disable_stream or set_dpms_off.

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Michael Mityushkin <michael.mityushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c

index 422fbf7..5800acf 100644 (file)
@@ -313,6 +313,10 @@ void dcn20_init_blank(
        }
        opp = dc->res_pool->opps[opp_id_src0];
 
+       /* don't override the blank pattern if already enabled with the correct one. */
+       if (opp->funcs->dpg_is_blanked && opp->funcs->dpg_is_blanked(opp))
+               return;
+
        if (num_opps == 2) {
                otg_active_width = otg_active_width / 2;
 
index 3a32810..8598ea2 100644 (file)
@@ -58,6 +58,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
        .enable_audio_stream = dce110_enable_audio_stream,
        .disable_audio_stream = dce110_disable_audio_stream,
        .disable_plane = dcn20_disable_plane,
+       .disable_pixel_data = dcn20_disable_pixel_data,
        .pipe_control_lock = dcn20_pipe_control_lock,
        .interdependent_update_lock = dcn10_lock_all_pipes,
        .cursor_lock = dcn10_cursor_lock,
index 5267e90..ce53339 100644 (file)
@@ -60,6 +60,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
        .enable_audio_stream = dce110_enable_audio_stream,
        .disable_audio_stream = dce110_disable_audio_stream,
        .disable_plane = dcn20_disable_plane,
+       .disable_pixel_data = dcn20_disable_pixel_data,
        .pipe_control_lock = dcn20_pipe_control_lock,
        .interdependent_update_lock = dcn10_lock_all_pipes,
        .cursor_lock = dcn10_cursor_lock,