Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 04/10] lib: Clean up format_desc
Date: Fri, 18 May 2018 15:42:28 +0300	[thread overview]
Message-ID: <20180518124228.GU23723@intel.com> (raw)
In-Reply-To: <152658798607.26696.8800252348903712595@mail.alporthouse.com>

On Thu, May 17, 2018 at 09:13:06PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-05-17 20:51:42)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Always populate the plane_bpp[] stuff, and use named initializers so
> > that we can actually see what's being set to what.
> > 
> > v2: Fix depth for xrgb8888
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> > ---
> >  lib/igt_fb.c | 66 +++++++++++++++++++++++++++++++++---------------------------
> >  1 file changed, 36 insertions(+), 30 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 5cf2cd7d9e90..af8ba70b0a2a 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -57,26 +57,35 @@
> >   */
> >  
> >  /* drm fourcc/cairo format maps */
> > -#define DF(did, cid, ...)      \
> > -       { DRM_FORMAT_##did, CAIRO_FORMAT_##cid, # did, __VA_ARGS__ }
> >  static struct format_desc_struct {
> > +       const char *name;
> >         uint32_t drm_id;
> >         cairo_format_t cairo_id;
> > -       const char *name;
> > -       int bpp;
> >         int depth;
> > -       int planes;
> > +       int num_planes;
> >         int plane_bpp[4];
> >  } format_desc[] = {
> > -       DF(RGB565,      RGB16_565,      16, 16),
> > -       //DF(RGB888,    INVALID,        24, 24),
> > -       DF(XRGB8888,    RGB24,          32, 24),
> > -       DF(XRGB2101010, RGB30,          32, 30),
> > -       DF(ARGB8888,    ARGB32,         32, 32),
> > -       DF(NV12,        RGB24,          32, -1, 2, {8, 16}),
> > +       { .name = "RGB565", .depth = 16, .drm_id = DRM_FORMAT_RGB565,
> > +         .cairo_id = CAIRO_FORMAT_RGB16_565,
> > +         .num_planes = 1, .plane_bpp = { 16, },
> > +       },
> 
> There's no enum to suggest
> 	[MY_FORMAT_DESC_A] = {
> 		.name = "XRGB8888", .depth = 24, .drm_id = DRM_FORMAT_XRGB8888,
> 		.cairo_id = CAIRO_FORMAT_RGB24,
> 		.num_planes = 1, .plane_bpp = { 32, },
> 	}
> ?

I don't think we have anything like that atm.

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-05-18 12:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 19:51 [igt-dev] [PATCH i-g-t 01/10] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 02/10] lib: Clear packed YUV formats to black Ville Syrjala
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 03/10] lib: Don't use dumb buffers for YCbCr Ville Syrjala
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 04/10] lib: Clean up format_desc Ville Syrjala
2018-05-17 20:13   ` Chris Wilson
2018-05-18 12:42     ` Ville Syrjälä [this message]
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 05/10] lib: Add igt_matrix Ville Syrjala
2018-05-17 20:16   ` Chris Wilson
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 06/10] lib: Add igt_color_encoding Ville Syrjala
2018-05-17 20:48   ` Chris Wilson
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 07/10] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
2018-05-17 21:49   ` Chris Wilson
2018-05-18 12:41     ` Ville Syrjälä
2018-05-18 19:56   ` [igt-dev] [PATCH i-g-t v4 " Ville Syrjala
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 08/10] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
2018-05-17 22:41   ` Chris Wilson
2018-05-18 13:00     ` Ville Syrjälä
2018-05-18 13:17       ` Chris Wilson
2018-05-18 19:57   ` [igt-dev] [PATCH i-g-t v5 " Ville Syrjala
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 09/10] lib/fb: Add color_encoding/color_range to igt_fb Ville Syrjala
2018-05-17 21:42   ` Chris Wilson
2018-05-17 19:51 ` [igt-dev] [PATCH i-g-t 10/10] lib/kms: Respect fb color_encoding/color_range Ville Syrjala
2018-05-17 20:09 ` [igt-dev] [PATCH i-g-t 01/10] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Chris Wilson
2018-05-17 20:29 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/10] " Patchwork
2018-05-17 23:38 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-05-18 20:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/10] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
2018-05-19  6:30 ` [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=20180518124228.GU23723@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox