]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: eDP intermittent black screen during PnP
authorPeikang Zhang <peikang.zhang@amd.com>
Tue, 8 Sep 2020 15:27:25 +0000 (11:27 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 16:27:43 +0000 (12:27 -0400)
[Why]
We dont's turn off backlight before power off eDP (VDD),
which is a violation of eDP specs.

[How]
Power off eDP backlight before power off eDP

Signed-off-by: Peikang Zhang <peikang.zhang@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c

index 81c026319ccdd38646490ceb3859d83347817dce..dba338c882561eab59e6d1822480109ca3e81ad6 100644 (file)
@@ -229,6 +229,8 @@ void dp_disable_link_phy(struct dc_link *link, enum signal_type signal)
                dp_receiver_power_ctrl(link, false);
 
        if (signal == SIGNAL_TYPE_EDP) {
+               if (link->dc->hwss.edp_backlight_control)
+                       link->dc->hwss.edp_backlight_control(link, false);
                link->link_enc->funcs->disable_output(link->link_enc, signal);
                link->dc->hwss.edp_power_control(link, false);
        } else {
index 1002ce9979dced68d4886c6e5a75d95e943e52cb..27a1262a20f6083cfcf3df8ac0c44a752c801b62 100644 (file)
@@ -2890,6 +2890,7 @@ static const struct hw_sequencer_funcs dce110_funcs = {
        .setup_stereo = NULL,
        .set_avmute = dce110_set_avmute,
        .wait_for_mpcc_disconnect = dce110_wait_for_mpcc_disconnect,
+       .edp_backlight_control = dce110_edp_backlight_control,
        .edp_power_control = dce110_edp_power_control,
        .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
        .set_cursor_position = dce110_set_cursor_position,
index a1d1559bb5d73003e7cf12b5370aa86971b89a10..b24c8ae8b1ece87b4eaa87add1cd93b8cf098415 100644 (file)
@@ -66,6 +66,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
        .get_hw_state = dcn10_get_hw_state,
        .clear_status_bits = dcn10_clear_status_bits,
        .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect,
+       .edp_backlight_control = dce110_edp_backlight_control,
        .edp_power_control = dce110_edp_power_control,
        .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
        .set_cursor_position = dcn10_set_cursor_position,
index 966e1790b9bfde07c5b276ce8540ec2c6dd4201f..072193c5ffe662bddcb6179fcf83c43f05a5262d 100644 (file)
@@ -68,6 +68,7 @@ static const struct hw_sequencer_funcs dcn20_funcs = {
        .get_hw_state = dcn10_get_hw_state,
        .clear_status_bits = dcn10_clear_status_bits,
        .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect,
+       .edp_backlight_control = dce110_edp_backlight_control,
        .edp_power_control = dce110_edp_power_control,
        .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
        .set_cursor_position = dcn10_set_cursor_position,
index 2ba880c3943c3d48c2aa2f5d1f74a47ba7318c7c..2b7396c9fcb480cc9c740701c426f1bcefe7850e 100644 (file)
@@ -69,6 +69,7 @@ static const struct hw_sequencer_funcs dcn21_funcs = {
        .get_hw_state = dcn10_get_hw_state,
        .clear_status_bits = dcn10_clear_status_bits,
        .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect,
+       .edp_backlight_control = dce110_edp_backlight_control,
        .edp_power_control = dce110_edp_power_control,
        .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
        .set_cursor_position = dcn10_set_cursor_position,
index 19daa456e3bfe752cc142912412f3ac7d4bde25c..7c90c222250623a78256dbf0de6d20cc41cabad6 100644 (file)
@@ -69,6 +69,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
        .get_hw_state = dcn10_get_hw_state,
        .clear_status_bits = dcn10_clear_status_bits,
        .wait_for_mpcc_disconnect = dcn10_wait_for_mpcc_disconnect,
+       .edp_backlight_control = dce110_edp_backlight_control,
        .edp_power_control = dce110_edp_power_control,
        .edp_wait_for_hpd_ready = dce110_edp_wait_for_hpd_ready,
        .set_cursor_position = dcn10_set_cursor_position,