]> Gentwo Git Trees - linux/.git/commit
drm/sysfb: Find screen_info format with helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Jul 2025 15:13:03 +0000 (17:13 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 26 Aug 2025 07:54:17 +0000 (09:54 +0200)
commit31eea29d727ce35b747e68c6be350ca07b7ecd9b
tree4715bd99a4def1c6f09b4696a8b0eec6ba104864
parentd6d05e2af796ca25094f80a73d8841505d54368b
drm/sysfb: Find screen_info format with helpers

Convert drm_sysfb_get_format_si() to lookup the screen_info color
format as struct pixel_format with screen_info_pixel_format(). Then
search the list of given formats for the screen_info format with
pixel_format_equal().

Replaces custom code with helpers. The pixel-compare helper
pixel_format_equal() also handles indexed color formats. Prepares
for sysfb drivers to support color palettes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://lore.kernel.org/r/20250714151513.309475-4-tzimmermann@suse.de
drivers/gpu/drm/sysfb/drm_sysfb_screen_info.c