[PATCH] drm/arm/hdlcd: Replace struct simplefb_format with custom type

Javier Martinez Canillas javierm at redhat.com
Fri May 30 10:10:21 UTC 2025


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.

> 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>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list