drm/format-helper: Add generic conversion to 32-bit formats
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 28 Mar 2025 14:14:58 +0000 (15:14 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Apr 2025 13:35:20 +0000 (15:35 +0200)
commitd55d0b066f4eedf030c9c1a67a2a0abffece3abc
tree06ab516bd8a3908e7a8596a176e75327a7ba253d
parentc46d18f98261d99711003517c444417a303c7fae
drm/format-helper: Add generic conversion to 32-bit formats

Add drm_fb_xfrm_line_32to32() to implement conversion from 32-bit
pixels to 32-bit pixels. The pixel-conversion is specified by the
given callback parameter. Mark the helper as always_inline to avoid
overhead from function calls.

Then implement all existing line-conversion functions with the new
generic call and the respective pixel-conversion helper.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250328141709.217283-3-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c