Skip to content
Commit 24f99d2b authored by Simon Ser's avatar Simon Ser Committed by Alex Deucher
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Reported-by: default avatarPierre-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: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7fe46615
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment