]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/arm/hdlcd: Replace struct simplefb_format with custom type
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 10 Jun 2025 07:28:55 +0000 (09:28 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 11 Jun 2025 07:29:47 +0000 (09:29 +0200)
commitedcc9d24fb8ece4e704f352f53733ea44986732b
treedf616e2b23ceed7e74f64c9b3d45087b20be5893
parentc598d5eb9fb331ba17bc9ad67ae9a2231ca5aca5
drm/arm/hdlcd: Replace struct simplefb_format with custom type

Map DRM FourCC codes to pixel descriptions with an internal struct
type. Avoid simplefb's struct simplefb_format, which is for parsing
"simple-framebuffer" DT nodes. Drop the unsupported formats with
alpha channel from the list.

The HDLCD drivers uses struct simplefb_format and its default
initializer SIMPLEFB_FORMATS to map DRM_FORMAT_ constants to pixel
descriptions. The simplefb helpers are for parsing "simple-framebuffer"
DT nodes and should be avoided in other context. Therefore replace it
in hdlcd with a custom struct type and pixel descriptions from
PIXEL_FORMAT_ constants.

This change also removes including <linux/platform_data/simplefb.h>,
which includes several unrelated headers, such as <linux/fb.h>.

v2:
- drop unsupported alpha formats (Liviu)
- keep original sorting of formats (Javier)
- use anonymous type for supported_formats

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://lore.kernel.org/r/20250610073027.322944-1-tzimmermann@suse.de
drivers/gpu/drm/arm/hdlcd_crtc.c