From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add XBGR2101010 support via pixman
Date: Tue, 1 Oct 2019 15:08:12 +0300 [thread overview]
Message-ID: <20191001120812.GG1208@intel.com> (raw)
In-Reply-To: <156987211134.1880.16996048229986357632@skylake-alporthouse-com>
On Mon, Sep 30, 2019 at 08:35:11PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2019-09-18 14:51:55)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Use pixman to swizzle cairo RGB30 into XBGR2101010.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > lib/igt_fb.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index bad3eeca4132..612c25d5baed 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -157,6 +157,12 @@ static const struct format_desc_struct {
> > .num_planes = 1, .plane_bpp = { 32, },
> > .hsub = 1, .vsub = 1,
> > },
> > + { .name = "XBGB2101010", .depth = -1, .drm_id = DRM_FORMAT_XBGR2101010,
> > + .cairo_id = CAIRO_FORMAT_INVALID,
> > + .pixman_id = PIXMAN_x2b10g10r10,
> > + .num_planes = 1, .plane_bpp = { 32, },
> > + .hsub = 1, .vsub = 1,
> > + },
>
> That's self-consistent.
>
> > { .name = "ARGB8888", .depth = 32, .drm_id = DRM_FORMAT_ARGB8888,
> > .cairo_id = CAIRO_FORMAT_ARGB32,
> > .pixman_id = PIXMAN_a8r8g8b8,
> > @@ -3107,6 +3113,9 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
> > } else if (PIXMAN_FORMAT_A(f->pixman_id)) {
> > cairo_id = CAIRO_FORMAT_ARGB32;
> > drm_format = DRM_FORMAT_ARGB8888;
> > + } else if (PIXMAN_FORMAT_R(f->pixman_id) > 8) {
> > + cairo_id = CAIRO_FORMAT_RGB30;
> > + drm_format = DRM_FORMAT_XRGB2101010;
>
> A little less sure about this rule, but if it ever needs extending for
> more formats, it should hopefully become quickly apparent.
Yeah, it's a bit too fuzzy for my taste. I was pondering about putting
the correct cairo format into the format_desc itself, but that would
require some changes to the "should we convert and how?" logic elsewhere.
Seems doable but needs a little bit of actual thought.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks.
--
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:[~2019-10-01 12:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 13:51 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Add XBGR2101010 support via pixman Ville Syrjala
2019-09-18 13:51 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_fb: Extract use_convert() Ville Syrjala
2019-09-30 19:35 ` Chris Wilson
2019-09-18 14:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add XBGR2101010 support via pixman Patchwork
2019-09-30 19:35 ` [igt-dev] [PATCH i-g-t 1/2] " Chris Wilson
2019-10-01 12:08 ` Ville Syrjälä [this message]
2019-10-01 13:26 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] lib/igt_fb: Add XBGR2101010 support via pixman (rev2) Patchwork
2019-10-01 20:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-10-03 15:45 ` Ville Syrjälä
2019-10-03 15:49 ` Chris Wilson
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=20191001120812.GG1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.