]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/format-helper: Add generic conversion to 8-bit formats
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 28 Mar 2025 14:15:01 +0000 (15:15 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Apr 2025 13:35:22 +0000 (15:35 +0200)
commita376dcf49c391d06dad31a87e3cdfdf67fecc98d
tree6f139f71f4480b234c56e9a321d37f5256330f11
parentb39e5ba0ccb4014d94058eda21aec800c647863d
drm/format-helper: Add generic conversion to 8-bit formats

Add drm_fb_xfrm_line_32to8() to implement conversion from 32-bit
pixels to 8-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-6-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/drm_format_internal.h