[igt-dev] [PATCH v6 03/13] fb: Create common function to convert frame formats

Maxime Ripard maxime.ripard at bootlin.com
Wed Sep 5 13:16:36 UTC 2018


On Fri, Aug 31, 2018 at 04:41:10PM +0300, Ville Syrjälä wrote:
> On Fri, Aug 31, 2018 at 03:12:12PM +0200, Maxime Ripard wrote:
> > The current code to convert between two buffer formats is quite tied to the
> > cairo surface infrastructure. Since we'll want to reuse it, make that
> > function more generic by introducing a common structure that passes all the
> > arguments and a common function that will call the right functions we
> > needed.
> > 
> > Reviewed-by: Eric Anholt <eric at anholt.net>
> > Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
> > ---
> >  lib/igt_fb.c | 243 ++++++++++++++++++++++++++++++++--------------------
> >  1 file changed, 153 insertions(+), 90 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 4061fedec0c1..1914233786a5 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -1384,6 +1384,24 @@ struct fb_convert_blit_upload {
> >  	struct fb_blit_linear linear;
> >  };
> >  
> > +struct fb_convert_buf {
> > +	void			*ptr;
> > +	unsigned int		stride;
> > +	unsigned int		size;
> > +	uint32_t		fmt;
> > +	enum igt_color_encoding	color_encoding;
> > +	enum igt_color_range	color_range;
> > +	uint32_t		offsets[4];
> > +};
> 
> I wonder if we can just use igt_fb for that instead of duplicating most
> of it?

I guess we could yes. I'll try to adjust the patches to do that.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20180905/48adc982/attachment.sig>


More information about the igt-dev mailing list