summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/core
diff options
context:
space:
mode:
authorLewis Huang <Lewis.Huang@amd.com>2019-07-02 22:33:34 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-07-18 14:27:26 -0500
commit291ac8fb0cd934104b1d154220695ec049592a25 (patch)
tree8d124aa52250fa17bc5c6551d272bb54275016bc /drivers/gpu/drm/amd/display/dc/core
parent46825fcfbe162609393976e18f106dafddca6f67 (diff)
downloadlinux-291ac8fb0cd934104b1d154220695ec049592a25.tar.bz2
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. 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> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c20
1 files changed, 16 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 d6a0a08f5cda..94f126d2331c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -180,13 +180,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);
}
}
}