drm/amd/display: Avoid MPC infinite loop
authorAric Cyr <aric.cyr@amd.com>
Mon, 11 Jul 2022 14:03:03 +0000 (10:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 25 Jul 2022 21:14:41 +0000 (17:14 -0400)
commit8de297dc046c180651c0500f8611663ae1c3828a
tree6bcd0c2dbd6ce0804026584763f1d0cffc704641
parent4c5aa594928f97593502a66d5a9075f5f5dd064b
drm/amd/display: Avoid MPC infinite loop

[why]
In some cases MPC tree bottom pipe ends up point to itself.  This causes
iterating from top to bottom to hang the system in an infinite loop.

[how]
When looping to next MPC bottom pipe, check that the pointer is not same
as current to avoid infinite loop.

Reviewed-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@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/dcn10/dcn10_mpc.c