[PATCH 1/4] drm: Centralize format information

Tomi Valkeinen tomi.valkeinen at ti.com
Tue Jun 7 09:18:34 UTC 2016


On 07/06/16 02:33, Laurent Pinchart wrote:

> +/**
> + * struct drm_format_info - information about a DRM format
> + * @format: 4CC format identifier (DRM_FORMAT_*)
> + * @depth: color depth (number of bits per pixel excluding padding bits)
> + * @bpp: number of bits per pixel including padding
> + * @num_planes: number of color planes (1 to 3)
> + * @cpp: number of bytes per pixel (per plane)
> + * @hsub: horizontal chroma subsampling factor
> + * @vsub: vertical chroma subsampling factor
> + */
> +struct drm_format_info {
> +	u32 format;
> +	unsigned int depth;
> +	unsigned int bpp;
> +	unsigned int num_planes;
> +	unsigned int cpp[3];
> +	unsigned int hsub;
> +	unsigned int vsub;
> +};

Any reason not to pack this a bit? All those unsigned ints would fit
easily into u8.

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160607/c78c65dc/attachment.sig>


More information about the dri-devel mailing list