All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>,
	eben@raspberrypi.org, igt-dev@lists.freedesktop.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [igt-dev] [PATCH i-g-t v5 03/13] igt: fb: generic YUV convertion function
Date: Wed, 30 Jan 2019 16:06:08 +0100	[thread overview]
Message-ID: <20190130150608.2ejsnb6gtculsm4c@flea> (raw)
In-Reply-To: <20190129200736.GI20097@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 4565 bytes --]

Hi Ville,

On Tue, Jan 29, 2019 at 10:07:36PM +0200, Ville Syrjälä wrote:
> On Fri, Jan 25, 2019 at 03:58:32PM +0100, Maxime Ripard wrote:
> > The current way we work when we want to support a new YUV format to IGT, we
> > also need to add new function to convert to and from XRGB8888.
> > 
> > This doesn't really scale however, and creates a lot of code to maintain.
> > In order to work around this, create a generic function to convert to RGB
> > and one to convert from RGB.
> > 
> > The only thing that is needed now is to add new parameters, and that's it.
> 
> What's the performance impact of this?

I just measured one test on a old laptop we have here (with an i7 4600U):

The first run is with the current code (note that the message is wrong
and its milliseconds, not seconds):

./build/tests/kms_plane --run-subtest pixel-format-pipe-a-planes 
IGT-Version: 1.23-g1c1612bd (x86_64) (Linux: 4.18.0-1-amd64 x86_64)
Starting subtest: pixel-format-pipe-A-planes
Testing format XR24 (0x34325258) on A.0
Testing format RG16 (0x36314752) on A.0
Testing format XR30 (0x30335258) on A.0
Testing format XR24 (0x34325258) on A.1
Testing format YUYV (0x56595559) on A.1
took 79.655000 seconds to execute
took 76.913000 seconds to execute
took 77.148000 seconds to execute
took 76.004000 seconds to execute
took 77.223000 seconds to execute
took 76.348000 seconds to execute
took 74.939000 seconds to execute
took 76.563000 seconds to execute
Testing format YVYU (0x55595659) on A.1
took 75.744000 seconds to execute
took 76.446000 seconds to execute
took 75.803000 seconds to execute
took 76.711000 seconds to execute
took 75.568000 seconds to execute
took 78.681000 seconds to execute
took 77.757000 seconds to execute
took 76.557000 seconds to execute
Testing format UYVY (0x59565955) on A.1
took 77.667000 seconds to execute
took 76.608000 seconds to execute
took 77.551000 seconds to execute
took 76.773000 seconds to execute
took 77.498000 seconds to execute
took 72.944000 seconds to execute
took 72.988000 seconds to execute
took 77.015000 seconds to execute
Testing format VYUY (0x59555956) on A.1
took 77.795000 seconds to execute
took 72.955000 seconds to execute
took 72.945000 seconds to execute
took 77.114000 seconds to execute
took 77.893000 seconds to execute
took 72.930000 seconds to execute
took 72.949000 seconds to execute
took 73.089000 seconds to execute
Testing format AR24 (0x34325241) on A.2
Subtest pixel-format-pipe-A-planes: SUCCESS (12.297s)

This is the same test, with the new conversion code:

./build/tests/kms_plane --run-subtest pixel-format-pipe-a-planes 
IGT-Version: 1.23-gec936cad (x86_64) (Linux: 4.18.0-1-amd64 x86_64)
Starting subtest: pixel-format-pipe-A-planes
Testing format XR24 (0x34325258) on A.0
Testing format RG16 (0x36314752) on A.0
Testing format XR30 (0x30335258) on A.0
Testing format XR24 (0x34325258) on A.1
Testing format YUYV (0x56595559) on A.1
took 79.515000 seconds to execute
took 79.751000 seconds to execute
took 79.271000 seconds to execute
took 75.816000 seconds to execute
took 75.774000 seconds to execute
took 79.381000 seconds to execute
took 78.029000 seconds to execute
took 78.134000 seconds to execute
Testing format YVYU (0x55595659) on A.1
took 78.705000 seconds to execute
took 78.814000 seconds to execute
took 78.498000 seconds to execute
took 78.636000 seconds to execute
took 78.821000 seconds to execute
took 78.706000 seconds to execute
took 78.662000 seconds to execute
took 78.800000 seconds to execute
Testing format UYVY (0x59565955) on A.1
took 78.731000 seconds to execute
took 78.949000 seconds to execute
took 79.031000 seconds to execute
took 79.433000 seconds to execute
took 77.495000 seconds to execute
took 79.217000 seconds to execute
took 78.766000 seconds to execute
took 78.944000 seconds to execute
Testing format VYUY (0x59555956) on A.1
took 74.723000 seconds to execute
took 79.081000 seconds to execute
took 78.154000 seconds to execute
took 78.163000 seconds to execute
took 78.282000 seconds to execute
took 78.346000 seconds to execute
took 78.326000 seconds to execute
took 78.272000 seconds to execute
Testing format AR24 (0x34325241) on A.2
Subtest pixel-format-pipe-A-planes: SUCCESS (13.881s)

So it looks like we're losing 2-3ms per conversion (on a 1920x1080
frame). It seems pretty negligible to me, but you're the jugde here :)

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-01-30 15:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 14:58 [igt-dev] [PATCH i-g-t v5 00/13] igt: chamelium: Test YUV buffers using the Chamelium Maxime Ripard
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 01/13] igt: fb: Add subsampling parameters to the formats Maxime Ripard
2019-01-29 19:42   ` Lyude Paul
2019-02-05 12:52   ` Paul Kocialkowski
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 02/13] igt: fb: Reduce tile size alignment for non intel platforms Maxime Ripard
2019-01-29 19:42   ` Lyude Paul
2019-02-05 12:52   ` Paul Kocialkowski
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 03/13] igt: fb: generic YUV convertion function Maxime Ripard
2019-01-29 19:42   ` Lyude Paul
2019-01-29 20:07   ` Ville Syrjälä
2019-01-30 15:06     ` Maxime Ripard [this message]
2019-02-05 12:53   ` Paul Kocialkowski
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 04/13] igt: fb: Move i915 YUV buffer clearing code to a function Maxime Ripard
2019-01-29 19:43   ` Lyude Paul
2019-02-05 12:53   ` Paul Kocialkowski
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 05/13] igt: fb: Refactor dumb buffer allocation path Maxime Ripard
2019-01-25 16:16   ` Deepak Singh Rawat
2019-01-30 14:18     ` Maxime Ripard
2019-01-29 19:46   ` Lyude Paul
2019-01-30 15:25     ` Maxime Ripard
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 06/13] igt: fb: Account for all planes bpp Maxime Ripard
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 07/13] igt: fb: Don't pass the stride when allocating a dumb, multi-planar buffer Maxime Ripard
2019-01-29 20:08   ` Lyude Paul
2019-01-30 15:38     ` Maxime Ripard
2019-01-31 18:42       ` Lyude Paul
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 08/13] igt: fb: Clear YUV dumb buffers Maxime Ripard
2019-01-29 20:08   ` Lyude Paul
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 09/13] igt: fb: Rework YUV i915 allocation path Maxime Ripard
2019-01-25 15:34   ` Paul Kocialkowski
2019-01-29 20:10   ` Lyude Paul
2019-02-05  9:40   ` Paul Kocialkowski
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 10/13] igt: fb: Add a bunch of new YUV formats Maxime Ripard
2019-01-29 20:11   ` Lyude Paul
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 11/13] igt: tests: chamelium: Start to unify tests Maxime Ripard
2019-01-29 20:13   ` Lyude Paul
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 12/13] igt: tests: chamelium: Convert VGA tests to do_test_display Maxime Ripard
2019-01-29 20:14   ` Lyude Paul
2019-01-25 14:58 ` [igt-dev] [PATCH i-g-t v5 13/13] igt: tests: chamelium: Add YUV formats tests Maxime Ripard
2019-01-29 20:14   ` Lyude Paul
2019-01-25 15:50 ` [igt-dev] ✗ Fi.CI.BAT: failure for igt: chamelium: Test YUV buffers using the Chamelium (rev7) 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=20190130150608.2ejsnb6gtculsm4c@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=eben@raspberrypi.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=ville.syrjala@linux.intel.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 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.