drm/amd/display: Avoid MPC infinite loop
authorJosip Pavic <Josip.Pavic@amd.com>
Thu, 21 Jul 2022 19:33:00 +0000 (15:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Aug 2022 19:12:06 +0000 (15:12 -0400)
commit615fc50207fa27453ba7f5fa1abd60a01a498136
tree7f2812f4e75e849a2d5143a6b870fbd1ec6962f3
parent9c580e8f6cd6524d4e2c3490c440110526f7ddd6
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: Jun Lei <Jun.Lei@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Josip Pavic <Josip.Pavic@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
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c