mirror_ubuntu-kernels/drivers/gpu/drm/amd
Simon Ser 24f99d2b21 drm/amd/display: add cursor FB size check
This patch expands the cursor checks added in "drm/amd/display: add basic
atomic check for cursor plane" to also include a FB size check. Without
this patch, setting a FB smaller than max_cursor_size with an invalid
width would result in amdgpu error messages and a fallback to a 64-byte
width:

    [drm:hubp1_cursor_set_attributes [amdgpu]] *ERROR* Invalid cursor pitch of 100. Only 64/128/256 is supported on DCN.

Note that DC uses the word "pitch" when actually checking the FB width.
Indeed, the function handle_cursor_update does this:

    attributes.pitch = attributes.width;

In my tests, the cursor FB actually had a pitch of 512 bytes.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Simon Ser <contact@emersion.fr>
Reported-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-11-24 12:09:52 -05:00
..
acp drm: amd/acp: fix broken menu structure 2020-03-13 11:52:35 -04:00
amdgpu drm/amdgpu/dce_virtual: Enable vBlank control for vf 2020-11-24 12:09:29 -05:00
amdkfd drm/amdkfd: Put ACPI table after using it 2020-11-13 17:29:46 -05:00
display drm/amd/display: add cursor FB size check 2020-11-24 12:09:52 -05:00
include drm/amd/display: Add internal display info 2020-11-24 12:08:15 -05:00
pm drm/amd/pm: Fix fall-through warnings for Clang 2020-11-24 12:05:50 -05:00