From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
eben@raspberrypi.org, igt-dev@lists.freedesktop.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [igt-dev] [PATCH v6 03/13] fb: Create common function to convert frame formats
Date: Thu, 6 Sep 2018 16:30:40 +0300 [thread overview]
Message-ID: <20180906133040.GA5565@intel.com> (raw)
In-Reply-To: <20180906124917.bn7siyjeaqafmkpg@flea>
On Thu, Sep 06, 2018 at 02:49:17PM +0200, Maxime Ripard wrote:
> On Thu, Sep 06, 2018 at 03:11:16PM +0300, Ville Syrjälä wrote:
> > On Thu, Sep 06, 2018 at 01:41:29PM +0200, Maxime Ripard wrote:
> > > 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@anholt.net>
> > > > > Signed-off-by: Maxime Ripard <maxime.ripard@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?
> > >
> > > After looking into it again, now I remember why I didn't do what you
> > > suggested. In the case where you are in the YUYV path, with a "shadow"
> > > buffer being used to perform the cairo operations on top of an YUV
> > > buffer, you end up with conversions in create_cairo_surface__convert
> > > and destroy_cairo_surface__convert, getting a fb_convert_blit_upload
> > > structure as an argument.
> > >
> > > That structure however is used to convert one buffer to the shadow
> > > buffer, or the other way around at destroy time. However, a single
> > > igt_fb is allocated for that structure, which makes it impossible to
> > > assign the second fb in that particular case. All the informations
> > > needed to perform the conversion are stored in multiple structures
> > > (fb_convert_blit_upload.linear, fb_convert_blit_upload.blit, and the
> > > actual igt_fb instance) that we need to aggregate to find the correct
> > > conversion parameters.
> >
> > The patch series I mentioned before [1] changes fb_blit_linear to inherit
> > from igt_fb. So presumably that should help?
> >
> > [1] https://patchwork.freedesktop.org/series/46876/
>
> Yeah, except that the shadow buffer would still not have a backing
> igt_fb,
Ah, the rgb24 thing? Hmm. I guess we could make that into an igt_fb as
well.
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-09-06 13:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 13:12 [igt-dev] [PATCH v6 00/13] chamelium: Test the plane formats Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 01/13] fb: Add buffer map/unmap functions Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 02/13] fb: convert: Remove swizzle from the arguments Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 03/13] fb: Create common function to convert frame formats Maxime Ripard
2018-08-31 13:41 ` Ville Syrjälä
2018-09-05 13:16 ` Maxime Ripard
2018-09-06 11:41 ` Maxime Ripard
2018-09-06 12:11 ` Ville Syrjälä
2018-09-06 12:49 ` Maxime Ripard
2018-09-06 13:30 ` Ville Syrjälä [this message]
2018-08-31 13:12 ` [igt-dev] [PATCH v6 04/13] fb: Add format conversion routine Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 05/13] fb: Fix ARGB8888 color depth Maxime Ripard
2018-08-31 13:42 ` Ville Syrjälä
2018-09-05 9:35 ` Maxime Ripard
2018-09-05 10:14 ` Ville Syrjälä
2018-09-05 13:19 ` Maxime Ripard
2018-09-05 13:37 ` Ville Syrjälä
2018-09-06 7:22 ` Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 06/13] fb: Add support for conversions through pixman Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 07/13] fb: Add depth lookup function Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 08/13] fb: Add more formats Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 09/13] chamelium: Split CRC test function in two Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 10/13] chamelium: Change our pattern for a custom one if needed Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 11/13] chamelium: Add format support Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 12/13] chamelium: Add format subtests Maxime Ripard
2018-08-31 13:12 ` [igt-dev] [PATCH v6 13/13] tests: Add chamelium formats subtests to vc4 test lists Maxime Ripard
2018-09-03 8:33 ` [igt-dev] ✓ Fi.CI.BAT: success for chamelium: Test the plane formats (rev5) Patchwork
2018-09-03 9:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180906133040.GA5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=eben@raspberrypi.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=maxime.ripard@bootlin.com \
--cc=paul.kocialkowski@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).