aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch
new file mode 100644
index 00000000..67266058
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3093-drm-amd-display-Add-debug-entry-to-destroy-disconnec.patch
@@ -0,0 +1,67 @@
+From 0d4087e3311bc196972bfa8820912e2ad464411c Mon Sep 17 00:00:00 2001
+From: Lewis Huang <Lewis.Huang@amd.com>
+Date: Tue, 2 Jul 2019 22:33:34 -0500
+Subject: [PATCH 3093/4256] drm/amd/display: Add debug entry to destroy
+ disconnected edp link
+
+Add a flag to dc_debug_options to determine if a disconnected edp link
+should be destroyed.
+
+Change-Id: I49ccabe2cedc02d49fe3cd085710ea7459bca205
+Signed-off-by: Lewis Huang <Lewis.Huang@amd.com>
+Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
+Acked-by: Leo Li <sunpeng.li@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc.c | 20 ++++++++++++++++----
+ drivers/gpu/drm/amd/display/dc/dc.h | 1 +
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index 886fcc1e701f..ecf562e386cb 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -184,13 +184,25 @@ static bool create_links(
+ link = link_create(&link_init_params);
+
+ if (link) {
+- if (dc->config.edp_not_connected &&
+- link->connector_signal == SIGNAL_TYPE_EDP) {
+- link_destroy(&link);
+- } else {
++ bool should_destory_link = false;
++
++ if (link->connector_signal == SIGNAL_TYPE_EDP) {
++ if (dc->config.edp_not_connected)
++ should_destory_link = true;
++ else if (dc->debug.remove_disconnect_edp) {
++ enum dc_connection_type type;
++ dc_link_detect_sink(link, &type);
++ if (type == dc_connection_none)
++ should_destory_link = true;
++ }
++ }
++
++ if (!should_destory_link) {
+ dc->links[dc->link_count] = link;
+ link->dc = dc;
+ ++dc->link_count;
++ } else {
++ link_destroy(&link);
+ }
+ }
+ }
+diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
+index 8d890468908f..85e1ce5d5225 100644
+--- a/drivers/gpu/drm/amd/display/dc/dc.h
++++ b/drivers/gpu/drm/amd/display/dc/dc.h
+@@ -381,6 +381,7 @@ struct dc_debug_options {
+ bool scl_reset_length10;
+ bool hdmi20_disable;
+ bool skip_detection_link_training;
++ bool remove_disconnect_edp;
+ unsigned int force_odm_combine; //bit vector based on otg inst
+ unsigned int force_fclk_khz;
+ bool disable_tri_buf;
+--
+2.17.1
+