]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix calculation for cursor CAB allocation
authorGeorge Shen <george.shen@amd.com>
Wed, 2 Nov 2022 03:03:03 +0000 (23:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Nov 2022 18:18:48 +0000 (13:18 -0500)
commitf394b0fa56302a5eca4394b0b58f94d18daad58f
tree5796a5a60aaf69c56152dadc35b67fca3a1f00b4
parent343cc5c848f408edc99a545f8ffc1ee5f22fcbd1
drm/amd/display: Fix calculation for cursor CAB allocation

[Why]
The cursor size (in memory) is currently incorrectly calculated,
resulting not enough CAB being allocated for static screen cursor
in MALL refresh. This results in cursor image corruption.

[How]
Use cursor pitch instead of cursor width when calculating cursor size.
Update num cache lines calculation to use the result of the cursor size
calculation instead of manually recalculating again.

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: George Shen <george.shen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.0.x
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c