[PATCH 1/4] drm: Centralize format information

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Jun 7 11:48:29 UTC 2016


Hi Tomi,

On Tuesday 07 Jun 2016 12:18:34 Tomi Valkeinen wrote:
> 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.

Good point, I'll do that.

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list