drm/amd/display: Fix dml2 assigned pipe search
authorDmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Thu, 4 Jan 2024 14:14:18 +0000 (09:14 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jan 2024 23:35:39 +0000 (18:35 -0500)
commitd451b534e0b409abc3c5733c66e32708f443abf1
tree7cd222bffa2b7a2cf0f3a877091a2f0e3432c434
parentf0ec30549a2b6e6a9db7d71001f4b3c1ed45c675
drm/amd/display: Fix dml2 assigned pipe search

[Why & How]
DML2 currently finds assigned pipes in array order rather than the
existing linked list order. This results in rearranging pipe order
on flip and more importantly otg inst and pipe idx mismatch.

This change preserves the order of existing pipes and guarantees
the head pipe will have matching otg inst and pipe idx.

Reviewed-by: Gabe Teeger <gabe.teeger@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c