]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix CAB allocation for multiple displays
authorAurabindo Pillai <aurabindo.pillai@amd.com>
Fri, 15 Jul 2022 18:59:26 +0000 (14:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Aug 2022 19:11:26 +0000 (15:11 -0400)
commit74a574d74513e2a32b6fdd3e47ff17afc5af3d9a
treef0e54b4f70e4b1a864d1c0520603dc083e5d9c05
parentd3069c9a84ff5239b0ac657dd657b17b54d822e8
drm/amd/display: fix CAB allocation for multiple displays

[Why & How]
When multiple displays are used, the underlying framebuffers could be
two separate framebuffers, or a single large framebuffer. Fix the
calculation logic for CAB to account for large framebuffer. Current
logic assumes that any FB that the plane points to are independent. When
a single FB is used on the system, this does 2 times allocation.

Add a check to prevent duplicate allocation by checking if the base
addresses are the same, and then ensuring that the if we allocate using
the pitch, whole of the other fbs will be accounted for in the first
allocation.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@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/dcn32/dcn32_hwseq.c