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 8/8] lib: Add support for rendering into packed YCbCr framebuffers
Date: Wed, 28 Feb 2018 16:59:46 +0200	[thread overview]
Message-ID: <20180228145946.GI5453@intel.com> (raw)
In-Reply-To: <151976741431.21577.3459632848889357878@mail.alporthouse.com>

On Tue, Feb 27, 2018 at 09:36:54PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-02-27 21:21:20)
> > +static void convert_yuyv_to_rgb24(struct igt_fb *fb, struct fb_convert_blit_upload *blit,
> > +                                 const unsigned char swz[4])
> > +{
> > +       int i, j;
> > +       const uint8_t *yuyv;
> > +       uint8_t *rgb24 = blit->rgb24.map;
> > +       unsigned rgb24_stride = blit->rgb24.stride, yuyv_stride = blit->linear.stride;
> > +       uint8_t *buf = malloc(blit->linear.size);
> > +       bool full_range = false; /* FIXME */
> > +       const struct igt_color_encoding *e = &igt_ycbcr_bt601; /* FIXME */
> > +       struct igt_mat4 m = igt_ycbcr_to_rgb_matrix(e, full_range);
> > +
> > +       igt_assert((fb->width & 1) == 0);
> > +
> > +       /*
> > +        * Reading from the BO is awfully slow because of lack of read caching,
> > +        * it's faster to copy the whole BO to a temporary buffer and convert
> > +        * from there.
> > +        */
> > +       memcpy(buf, blit->linear.map, blit->linear.size);
> 
> Frequent enough to do memcpy_from_wc?

I've not measured how bad this actually is, but optimizing memcpies
when possible doesn't seem like a bad idea to me. Maarten?

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

  reply	other threads:[~2018-02-28 14:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 21:21 [igt-dev] [PATCH i-g-t 1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 2/8] lib: Clear packed YUV formats to black Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 3/8] lib: Don't use dumb buffers for YCbCr Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 4/8] lib: Clean up format_desc Ville Syrjala
2018-02-28 18:44   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 5/8] lib: Add igt_matrix Ville Syrjala
2018-02-27 21:33   ` Chris Wilson
2018-02-28 14:57     ` Ville Syrjälä
2018-02-28 15:01       ` Ville Syrjälä
2018-02-28 17:36   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 6/8] lib: Add igt_color_encoding Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 7/8] lib: Use igt_matrix for ycbcr<->rgb conversion Ville Syrjala
2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-02-27 21:21 ` [igt-dev] [PATCH i-g-t 8/8] lib: Add support for rendering into packed YCbCr framebuffers Ville Syrjala
2018-02-27 21:36   ` Chris Wilson
2018-02-28 14:59     ` Ville Syrjälä [this message]
2018-03-01 11:00   ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-03-02  8:35   ` [igt-dev] [PATCH i-g-t v3 " Ville Syrjala
2018-02-27 23:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion Patchwork
2018-02-28 18:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
2018-02-28 19:34 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
2018-02-28 23:20 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev2) Patchwork
2018-03-01  0:33 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev3) Patchwork
2018-03-01 16:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev4) Patchwork
2018-03-02 17:30 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] lib: Add clamp() to igt_aux and use it for ycbcr<->rgb conversion (rev6) Patchwork
2018-03-02 21:09 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20180228145946.GI5453@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