drm/amd/display: Align cursor cache address to 2KB
authorJoshua Aberback <joshua.aberback@amd.com>
Sat, 27 Feb 2021 00:44:24 +0000 (19:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Mar 2021 03:03:12 +0000 (23:03 -0400)
commit554ba183b135ef09250b61a202d88512b5bbd03a
tree5ef166efdf619de5b5acc01b466bc10ca312c61c
parentc54a6fe4376927e9fd7e1beb6ca754bfbfb88738
drm/amd/display: Align cursor cache address to 2KB

[Why]
The registers for the address of the cursor are aligned to 2KB, so all
cursor surfaces also need to be aligned to 2KB. Currently, the
provided cursor cache surface is not aligned, so we need a workaround
until alignment is enforced by the surface provider.

[How]
 - round up surface address to nearest multiple of 2048
 - current policy is to provide a much bigger cache size than
   necessary,so this operation is safe

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c