]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/ast: Move cursor format conversion into helper function
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 26 Nov 2025 09:40:08 +0000 (10:40 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 1 Dec 2025 07:40:18 +0000 (08:40 +0100)
commit1e759ed22a62680c79aab266d73baaa2bee4de9f
tree12e75b9d5efb8a8ad1b88d66d22809deeda878bd
parente85e9ccf3f8404007f62dff9a02273fcdeb44206
drm/ast: Move cursor format conversion into helper function

Move the format conversion of the cursor framebuffer into the new
helper ast_cursor_plane_get_argb4444(). It returns a buffer in system
memory, which the atomic_update handler copies to video memory.

The returned buffer is either the GEM buffer itself, or a temporary
copy within the plane in ARGB4444 format.

As a small change, list supported formats explicitly in the switch
statement. Do not assume ARGB8888 input by default. The cursor
framebuffer knows its format, so should we.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patch.msgid.link/20251126094626.41985-2-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_cursor.c