drm/amd/display: Prefer currently used OTG master when acquiring free pipe
authorWenjing Liu <wenjing.liu@amd.com>
Mon, 30 Oct 2023 19:21:12 +0000 (15:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Nov 2023 14:30:50 +0000 (09:30 -0500)
commit673d6d73eba79a1205ac403b68ef63da1c823da2
treee25753fcb81a82627438e264e14b0366b52b5e6a
parent68cfc5d8e459f50e5f46dca3b0f3c97a75f39975
drm/amd/display: Prefer currently used OTG master when acquiring free pipe

[WHY & HOW]
When acquiring an OTG master pipe we should prefer currently enabled OTG
master pipes first. If there are no free pipes used as current OTG
master pipe then we will try to acquire a currently unused free pipe as
new OTG master instead of tearing down current secondary pipes from ODM
or MPC combine.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@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/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/inc/resource.h