On Wed, Sep 19, 2018 at 04:03:25PM +0300, Ville Syrjälä wrote: > On Tue, Sep 11, 2018 at 10:47:31AM +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 > > Signed-off-by: Maxime Ripard > > --- > > lib/igt_fb.c | 220 ++++++++++++++++++++++++++++++---------------------- > > 1 file changed, 130 insertions(+), 90 deletions(-) > > > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c > > index 66bdc02a0ce7..f829df59e9fa 100644 > > --- a/lib/igt_fb.c > > +++ b/lib/igt_fb.c > > @@ -1391,6 +1391,19 @@ struct fb_convert_blit_upload { > > struct fb_blit_linear linear; > > }; > > > > +struct fb_convert_buf { > > + void *ptr; > > + struct igt_fb *fb; > > +}; > > + > > +struct fb_convert { > > + unsigned int width; > > + unsigned int height; > > Are we expecting to convert between different sized fbs, or why do we > need these? This was meant to express that a conversion should happen on a given size, common to both fb. I guess we can remove it, but which one should we choose in such a case? The destination? Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com