Skip to content

Commit

Permalink
drm/amd/display: Bypass sink detect when there are no eDPs connected
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
Jake Wang authored and Alex Deucher committed Mar 24, 2021
1 parent 45150cd commit b094261
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/gpu/drm/amd/display/dc/core/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b094261

Please sign in to comment.