drm/amd/display: fix multi edp panel instancing
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Mon, 12 Dec 2022 22:42:59 +0000 (17:42 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jan 2023 19:57:10 +0000 (14:57 -0500)
A previous fix attempted to correct mismatch between DM display
targets and dc panel instancing by only counting connected panels.
This behaviour breaks a feature, thus this is an alternative solution
that allows mapping display targets to dc links during mod_power_create.

Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_link.h

index 3b9315a38b30b126e649b53eb21e16a6170233ae..1226ecb625b410e0c71d681c3ed42c7db8ab1433 100644 (file)
@@ -338,14 +338,13 @@ static inline bool dc_get_edp_link_panel_inst(const struct dc *dc,
        int edp_num, i;
 
        *inst_out = 0;
-       if (link->connector_signal != SIGNAL_TYPE_EDP || !link->local_sink)
+       if (link->connector_signal != SIGNAL_TYPE_EDP)
                return false;
        get_edp_links(dc, edp_links, &edp_num);
        for (i = 0; i < edp_num; i++) {
                if (link == edp_links[i])
                        break;
-               if (edp_links[i]->local_sink)
-                       (*inst_out)++;
+               (*inst_out)++;
        }
        return true;
 }