drm/amd/display: add an option to skip wait for HPD when powering on eDP panel
authorEvgenii Krasnikov <Evgenii.Krasnikov@amd.com>
Tue, 17 May 2022 18:21:24 +0000 (14:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:13:11 +0000 (16:13 -0400)
[HOW/WHY]
Add an option to skip edp_wait_for_hpd_ready when necessary

Reviewed-by: Jayendran Ramani <Jayendran.Ramani@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Evgenii Krasnikov <Evgenii.Krasnikov@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/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h

index 1982ec0b55d4bfccbe71dcd0bc22796d6c99419f..e0660e7356c9d44c2d496be99329d8ace910b500 100644 (file)
@@ -6971,13 +6971,14 @@ bool is_dp_128b_132b_signal(struct pipe_ctx *pipe_ctx)
                        dc_is_dp_signal(pipe_ctx->stream->signal));
 }
 
-void edp_panel_backlight_power_on(struct dc_link *link)
+void edp_panel_backlight_power_on(struct dc_link *link, bool wait_for_hpd)
 {
        if (link->connector_signal != SIGNAL_TYPE_EDP)
                return;
 
        link->dc->hwss.edp_power_control(link, true);
-       link->dc->hwss.edp_wait_for_hpd_ready(link, true);
+       if (wait_for_hpd)
+               link->dc->hwss.edp_wait_for_hpd_ready(link, true);
        if (link->dc->hwss.edp_backlight_control)
                link->dc->hwss.edp_backlight_control(link, true);
 }
index 44f167d2584f522e10104f0a7e15de83b45efb8d..aaa17d4dd46b925e1292b26fb7935fd9ea9a3b17 100644 (file)
@@ -193,6 +193,7 @@ enum dc_status dpcd_configure_lttpr_mode(
                struct link_training_settings *lt_settings);
 
 enum dp_link_encoding dp_get_link_encoding_format(const struct dc_link_settings *link_settings);
+bool dp_retrieve_lttpr_cap(struct dc_link *link);
 bool dpcd_write_128b_132b_sst_payload_allocation_table(
                const struct dc_stream_state *stream,
                struct dc_link *link,
@@ -214,11 +215,10 @@ void enable_dp_hpo_output(struct dc_link *link,
 void disable_dp_hpo_output(struct dc_link *link,
                const struct link_resource *link_res,
                enum signal_type signal);
+
 void setup_dp_hpo_stream(struct pipe_ctx *pipe_ctx, bool enable);
 bool is_dp_128b_132b_signal(struct pipe_ctx *pipe_ctx);
-
-bool dp_retrieve_lttpr_cap(struct dc_link *link);
-void edp_panel_backlight_power_on(struct dc_link *link);
+void edp_panel_backlight_power_on(struct dc_link *link, bool wait_for_hpd);
 void dp_receiver_power_ctrl(struct dc_link *link, bool on);
 void dp_source_sequence_trace(struct dc_link *link, uint8_t dp_test_mode);
 void dp_enable_link_phy(