summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Wang <haonan.wang2@amd.com>2021-03-02 17:55:36 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-03-23 23:32:25 -0400
commitb0942618fd12aa59e7ebee700a5242f02f9e55f9 (patch)
tree1474d13d049b063fb4efe5f0a05c07bd242cbe4a
parent45150cd27ceb8f5e86122a85620df68a89011560 (diff)
downloadlinux-stable-b0942618fd12aa59e7ebee700a5242f02f9e55f9.tar.gz
linux-stable-b0942618fd12aa59e7ebee700a5242f02f9e55f9.tar.bz2
linux-stable-b0942618fd12aa59e7ebee700a5242f02f9e55f9.zip
drm/amd/display: Bypass sink detect when there are no eDPs connected
[How & Why] Check DC config to determine if there are any eDPs connected. If there are no eDPs connected, bypass sink detect when querying eDP presence. Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Jake Wang <haonan.wang2@amd.com> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Acked-by: Solomon Chiu <solomon.chiu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 3dc49964ea7f..dffd150180ec 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1096,20 +1096,19 @@ static void detect_edp_presence(struct dc *dc)
{
struct dc_link *edp_links[MAX_NUM_EDP];
struct dc_link *edp_link = NULL;
+ enum dc_connection_type type;
int i;
int edp_num;
- bool edp_sink_present = true;
get_edp_links(dc, edp_links, &edp_num);
if (!edp_num)
return;
- if (dc->config.edp_not_connected) {
- edp_sink_present = false;
- } else {
- enum dc_connection_type type;
- for (i = 0; i < edp_num; i++) {
- edp_link = edp_links[i];
+ for (i = 0; i < edp_num; i++) {
+ edp_link = edp_links[i];
+ if (dc->config.edp_not_connected) {
+ edp_link->edp_sink_present = false;
+ } else {
dc_link_detect_sink(edp_link, &type);
edp_link->edp_sink_present = (type != dc_connection_none);
}