[igt-dev] [PATCH v7 04/14] fb: Create common function to convert frame formats
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Sep 25 12:20:28 UTC 2018
On Tue, Sep 25, 2018 at 09:51:15AM +0200, Maxime Ripard wrote:
> 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 <eric at anholt.net>
> > > Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
> > > ---
> > > 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?
Seems good enough to me.
--
Ville Syrjälä
Intel
More information about the igt-dev
mailing list