drm/amd/display: optimize dml2 pipe resource allocation order
authorWenjing Liu <wenjing.liu@amd.com>
Fri, 15 Mar 2024 16:03:12 +0000 (12:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 01:51:32 +0000 (21:51 -0400)
commit62297b71a02d73e761470f7907ec1ce63bb3615c
treee71737ca94a021c660350e9e53792a37db60e23c
parent7ae0caf348830d92661296ec46ec5b4cfeb440b2
drm/amd/display: optimize dml2 pipe resource allocation order

[why]
There could be cases that we are transition from MPC to ODM combine.
In this case if we map pipes before unmapping MPC pipes, we might
temporarly run out of pipes. The change reorders pipe resource
allocation. So we unmapping pipes before mapping new pipes.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Acked-by: Roman Li <roman.li@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/dml2/dml2_dc_resource_mgmt.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.h