diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3267-drm-amd-display-Add-temporary-delay-on-disconnect-pa.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3267-drm-amd-display-Add-temporary-delay-on-disconnect-pa.patch | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3267-drm-amd-display-Add-temporary-delay-on-disconnect-pa.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3267-drm-amd-display-Add-temporary-delay-on-disconnect-pa.patch new file mode 100644 index 00000000..58058a05 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3267-drm-amd-display-Add-temporary-delay-on-disconnect-pa.patch @@ -0,0 +1,101 @@ +From 183e321280b079077c8825935affc4330b13a2d1 Mon Sep 17 00:00:00 2001 +From: John Barberiz <jbarberi@amd.com> +Date: Fri, 12 Jan 2018 14:51:21 -0500 +Subject: [PATCH 3267/4131] drm/amd/display: Add temporary delay on disconnect + patch + +Signed-off-by: John Barberiz <jbarberi@amd.com> +Reviewed-by: Jun Lei <Jun.Lei@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 14 ++++++++++---- + drivers/gpu/drm/amd/display/dc/dc_types.h | 6 ++++++ + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c +index b09f77b..c7e159a 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c +@@ -50,6 +50,7 @@ + dm_logger_write(dc_ctx->logger, LOG_HW_HOTPLUG, \ + __VA_ARGS__) + ++#define DEFAULT_DELAY_DISCONNECT 100 + /******************************************************************************* + * Private structures + ******************************************************************************/ +@@ -117,7 +118,7 @@ struct gpio *get_hpd_gpio(struct dc_bios *dcb, + * true on success, false otherwise + */ + static bool program_hpd_filter( +- const struct dc_link *link) ++ const struct dc_link *link, int default_disconnect_delay) + { + bool result = false; + +@@ -133,7 +134,7 @@ static bool program_hpd_filter( + case SIGNAL_TYPE_HDMI_TYPE_A: + /* Program hpd filter */ + delay_on_connect_in_ms = 500; +- delay_on_disconnect_in_ms = 100; ++ delay_on_disconnect_in_ms = default_disconnect_delay; + break; + case SIGNAL_TYPE_DISPLAY_PORT: + case SIGNAL_TYPE_DISPLAY_PORT_MST: +@@ -695,6 +696,11 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) + dp_hbr_verify_link_cap(link, &link->reported_link_cap); + } + ++ /* Add delay for certain monitors */ ++ if (sink->edid_caps.panel_patch.disconnect_delay > 0 && ++ SIGNAL_TYPE_HDMI_TYPE_A) ++ program_hpd_filter(link, sink->edid_caps.panel_patch.disconnect_delay); ++ + /* HDMI-DVI Dongle */ + if (sink->sink_signal == SIGNAL_TYPE_HDMI_TYPE_A && + !sink->edid_caps.edid_hdmi) +@@ -1081,7 +1087,7 @@ static bool construct( + * If GPIO isn't programmed correctly HPD might not rise or drain + * fast enough, leading to bounces. + */ +- program_hpd_filter(link); ++ program_hpd_filter(link, DEFAULT_DELAY_DISCONNECT); + + return true; + device_tag_fail: +@@ -2000,7 +2006,7 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *link) + void core_link_resume(struct dc_link *link) + { + if (link->connector_signal != SIGNAL_TYPE_VIRTUAL) +- program_hpd_filter(link); ++ program_hpd_filter(link, DEFAULT_DELAY_DISCONNECT); + } + + static struct fixed31_32 get_pbn_per_slot(struct dc_stream_state *stream) +diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h +index 9faddfa..fbbe92f 100644 +--- a/drivers/gpu/drm/amd/display/dc/dc_types.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_types.h +@@ -193,6 +193,10 @@ union display_content_support { + } bits; + }; + ++struct dc_panel_patch { ++ unsigned int disconnect_delay; ++}; ++ + struct dc_edid_caps { + /* sink identification */ + uint16_t manufacturer_id; +@@ -219,6 +223,8 @@ struct dc_edid_caps { + + bool edid_hdmi; + bool hdr_supported; ++ ++ struct dc_panel_patch panel_patch; + }; + + struct view { +-- +2.7.4 + |