public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Use cairo conversion in igt_fb_convert_with_stride, v3.
Date: Mon, 8 Apr 2019 13:04:42 +0200	[thread overview]
Message-ID: <691be880-dcd1-76ad-5c9d-175c5e078a77@linux.intel.com> (raw)
In-Reply-To: <20190408085035.jduw3j5wcjm7dbpt@flea>

Op 08-04-2019 om 10:50 schreef Maxime Ripard:
> Hi Maarten
>
> On Fri, Apr 05, 2019 at 05:38:32PM +0200, Maarten Lankhorst wrote:
>> Op 05-04-2019 om 15:54 schreef Paul Kocialkowski:
>>> Hi,
>>>
>>> Le vendredi 05 avril 2019 à 14:52 +0200, Maarten Lankhorst a écrit :
>>>> Ever since commit 3fa65f4b532bd9a5b ("fb: Add support for conversions
>>>> through pixman") we can generate a valid cairo surface for any plane,
>>>> use this to avoid having to implement our own conversion routine.
>>>>
>>>> Instead of duplicating this functionality in igt_fb_convert_with_stride,
>>>> we can simply convert this to a few cairo calls, because we now support
>>>> cairo calls to any of the supported framebuffer formats.
>>> I don't think this is the case: cairo *only* takes linear buffers, so
>>> we need the explicit tiling conversion step after having converted to a
>>> new format with fb_convert. I don't see how it could work otherwise.
>>>
>>> Note that in igt, we're only interested in converting from linear to
>>> tiled, not the other way round (for now, at least), so that's the
>>> pipeline that the helper asssumes.
>> We have code to handle this exact conversion in i-g-t already, both
>> ways, see igt_get_cairo_surface(). :)
>>
>> You should be able to extend create_cairo_surface__convert() to
>> handle broadcom tiling as well,
>>
>> I didn't see a function to convert from tiled to untiled, else I
>> would have plugged it in for you.
> That might be a bit dumb, but why do we need to use cairo all the
> time in the first place?
>
> That seems like a waste of resources when the only thing you want to
> do is a conversion of one buffer to the other.

Cairo doesn't have its own internal buffer format, it uses the same pixman
calls that igt_fb_convert_with_stride does, so it's not less efficient.

The extra trip to convert the src buffer back after it's read from, or the
unnecessary conversion of the target buffer before it's overwritten it with
src buffer contents might be less efficient, but I don't think it's worth
optimizing it.

~Maarten

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

  reply	other threads:[~2019-04-08 11:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05 12:52 [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Use cairo conversion in igt_fb_convert_with_stride, v3 Maarten Lankhorst
2019-04-05 12:52 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_chamelium: Fix *-cmp-random and *-crc-random tests, v3 Maarten Lankhorst
2019-05-07 10:42   ` [igt-dev] [i-g-t, " Ser, Simon
2019-04-05 13:54 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_fb: Use cairo conversion in igt_fb_convert_with_stride, v3 Paul Kocialkowski
2019-04-05 15:38   ` Maarten Lankhorst
2019-04-08  8:50     ` Maxime Ripard
2019-04-08 11:04       ` Maarten Lankhorst [this message]
2019-04-09 14:59         ` Maxime Ripard
2019-04-05 14:08 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2019-04-06 11:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-05-10 12:33 [igt-dev] [PATCH i-g-t 1/2] " Maarten Lankhorst
2019-05-10 13:43 ` Paul Kocialkowski
2019-05-10 14:19   ` Maarten Lankhorst
2019-05-10 15:10     ` Paul Kocialkowski
2019-05-10 16:02       ` Maarten Lankhorst
2019-05-14  6:34         ` Juha-Pekka Heikkila
2019-05-16 12:59           ` Maarten Lankhorst

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=691be880-dcd1-76ad-5c9d-175c5e078a77@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=maxime.ripard@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