[PATCH] drm/arm/hdlcd: Replace struct simplefb_format with custom type
Thomas Zimmermann
tzimmermann at suse.de
Fri May 30 10:40:32 UTC 2025
Hi
Am 30.05.25 um 12:10 schrieb Javier Martinez Canillas:
> Thomas Zimmermann <tzimmermann at suse.de> writes:
>
>> Map DRM FourCC codes to pixel descriptions with internal type struct
>> hdlcd_format. Reorder formats by preference. Avoid simplefb's struct
>> simplefb_format, which is for parsing "simple-framebuffer" DT nodes.
>>
>> 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 the custom type struct hdlcd_format and the pixel
>> descriptions from PIXEL_FORMAT_ constants.
>>
>> Plane formats exported to userspace are roughly sorted as preferred
>> by hardware and/or driver. SIMPLEFB_FORMATS currently puts 16-bit
>> formats to the top of the list. Changing to struct hdlcd_format
>> allows for reordering the format list. 32-bit formats are now the
>> preferred ones.
>>
> Is this change in the preferred format a concern ? It seems reasonable
> to default to 32-bit formats but I wonder if something was relying on
> the old 16-bit format as the preferred one.
That would have not been a good idea. :D I can put this into a separate
patch, tough. So that it will be revertable easily.
Best regards
Thomas
>
>> This change also removes including <linux/platform_data/simplefb.h>,
>> which includes several unrelated headers, such as <linux/fb.h>.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
>> ---
> The patch makes sense to me though.
>
> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
More information about the dri-devel
mailing list