drm/amd/display: Fix handling duplicate planes on one stream
authorSung Joon Kim <sungkim@amd.com>
Wed, 11 Oct 2023 21:12:05 +0000 (17:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Nov 2023 17:03:30 +0000 (12:03 -0500)
commit35c1d9664cbfa3a592c208cff86353c7c7689eef
tree2cd44ed62773235b7bdba2bce0da393c96f6cfda
parented6e2782e9747508888f671e1101250bb19045be
drm/amd/display: Fix handling duplicate planes on one stream

[why]
DML2 does not handle the case when we have
a single stream sourcing 2 or more planes
that are duplicates of one another. To properly
handle this scenario, pipe index to plane index
mapping is used to decide which plane is being
processed and programmed.

[how]
Create static array of pipe index to plane index map.
Populate the array properly and use in appropriate places.

Reviewed-by: Xi (Alex) Liu <xi.liu@amd.com>
Acked-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Sung Joon Kim <sungkim@amd.com>
Signed-off-by: Hersen Wu <hersenxs.wu@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
drivers/gpu/drm/amd/display/dc/dml2/dml2_internal_types.h
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.h
drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c