All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Daniel Stone <daniel@fooishbar.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Daniel Vetter <daniel@ffwll.ch>, Eric Anholt <eric@anholt.net>
Subject: Re: [PATCH 00/25] Exynos DRM: new life of IPP (Image Post Processing) subsystem
Date: Tue, 17 Nov 2015 19:13:23 +0100	[thread overview]
Message-ID: <564B6E43.9020707@math.uni-bielefeld.de> (raw)
In-Reply-To: <CAPj87rNS2GFrfZKF6_RaizFW_PM1vGAPVwRGWt3GogDvbwrPgA@mail.gmail.com>

Hello guys,


Daniel Stone wrote:
> Hi Marek,
> 
> On 16 November 2015 at 11:35, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>> On 2015-11-12 15:46, Daniel Stone wrote:
>>> On 12 November 2015 at 12:44, Tobias Jakobi
>>> <tjakobi@math.uni-bielefeld.de> wrote:
>>>> I wonder how this interacts with page flipping. If I queue a pageflip
>>>> event with a buffer that needs to go through the IPP for display, where
>>>> does the delay caused by the operation factor it? If I understand this
>>>> correctly drmModePageFlip() still is going to return immediately, but I
>>>> might miss the next vblank period because the FIMC is still working on
>>>> the buffer.
>>>
>>> Hmm, from my reading of the patches, this didn't affect page-flip
>>> timings. In the sync case, it would block until the buffer was
>>> actually displayed, and in the async case, the event would still be
>>> delivered at the right time. But you're right that it does introduce
>>> hugely variable timings, which can be a problem for userspace which
>>> tries to be intelligent. And even then potentially misleading from a
>>> performance point of view: if userspace can rotate natively (e.g. as
>>> part of a composition blit, or when rendering buffers in the first
>>> place), then we can skip the extra work from G2D.
>>
>>
>> Page flip events are delivered to userspace at the right time. You are right
>> that there will be some delay between scheduling a buffer for display and
>> the
>> moment it gets displayed by hardware, but imho good application should sync
>> audio/video to the vblank events not the moment of scheduling a buffer. So
>> this delay should not influence on the final quality of displayed
> 
> Yes, of course: Weston does that as well. But the problem is that it
> introduces a delay into the very last part of the pipeline: if I
> submit a pageflip 8ms before vblank is due, I no longer have a
> guarantee that it will land in time for the next frame.
That's what I meant by "tight control" in my last message. The general
assumption is that page flipping can be done almost instantaneously,
because it's usually just some reprogramming of hw registers.

Also coupling any conversion to the actual presentation removes too much
freedom IMO. If I understand this correctly then e.g. the FIMC can work
standalone, so a user potentially wants to run a conversion queue on it,
feeding raw frames to it, getting converted frames out of it. Probably
everything in a separate thread.

In a video decoding context the user would also buffer the output, so
that he always has some frames in advance.

Doesn't work anymore if we couple things here.


>> The only problem I see, especially when color space conversion will be
>> added,
>> is how to tell generic application that some modes are preferred / not
>> preferred, so application would prefer native modes which are faster. On the
>> other hand application should be aware of the fact that hw scaling is
>> usually
>> faster / less power demanding than cpu scaling, so it is better to use such
>> mode with additional processing instead of doing that work with the cpu.
> 
> Of course, yes. The alternative is usually the GPU rather than CPU: if
> you tried to do it in CPU you wouldn't come anywhere close to native
> framerate.
> 
>>>> My problem here is that this abstraction would take too much control
>>>> from the user.
>>>>
>>>> Correct me if I have this wrong!
>>>
>>> I believe that was the concern previously, yeah. :) That, and encoding
>>> these semantics in a user-visible way could potentially be dangerous.
>>
>> I believe that having this feature is quite beneficial for generic
>> applications
>> (like weston for example). It is especially very useful for video overlay
>> display, where scaling, rotation and colorspace conversion are typical
>> use-cases. An alternative would be to introduce some generic API for a frame
>> buffer conversions.
> 
> Well, it depends really. Weston is aware of rotation and passes this
> information down to the clients, which are able to provide pre-rotated
> buffers, so from a pure performance/profiling point of view, really
> the clients should be doing this. In the case of V4L2/media clients,
> if they fed the buffer into IPP themselves and scheduled the rotation,
> this would push the performance hit earlier in the pipeline, when you
> have more parallelism and buffering, rather than at the very last
> point where it's quite serialised. In the case of GL/GPU clients, they
> could perform the rotation as part of their rendering pipeline, and in
> fact get the transformation for free.
> 
> The objection isn't to the functionality itself - which is very
> useful! - but that it's done in a way that makes it very opaque. It is
> quite clever, but having this as part of the semantics of core
> functionality is problematic in a lot of ways. When this was
> previously proposed, e.g. for VC4, the conclusion seemed to be that
> for these reasons, any memory-to-memory buffer processing should be
> performed in a separate step with a new API.
I assume there wasn't any discussion about how such an API would look like?



With best wishes,
Tobias

> 
> Cheers,
> Daniel
> 

      reply	other threads:[~2015-11-17 18:13 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 13:23 [PATCH 00/25] Exynos DRM: new life of IPP (Image Post Processing) subsystem Marek Szyprowski
2015-11-10 13:23 ` [PATCH 01/25] ARM: dts: exynos4: add rotator nodes Marek Szyprowski
2015-11-13  2:23   ` Krzysztof Kozlowski
2015-11-13  8:31     ` Marek Szyprowski
2015-11-13  8:35       ` Krzysztof Kozlowski
2015-11-13 13:29         ` [PATCH v2 1/4] " Marek Szyprowski
2015-11-13 13:29           ` [PATCH v2 2/4] ARM: dts: exynos4: fix power domain for sysmmu-rotator device Marek Szyprowski
2015-11-14 11:37             ` Krzysztof Kozlowski
2015-11-13 13:29           ` [PATCH v2 3/4] ARM: dts: exynos5250: add rotator node Marek Szyprowski
2015-11-14 11:37             ` Krzysztof Kozlowski
2015-11-13 13:29           ` [PATCH v2 4/4] ARM: dts: exynos542x: " Marek Szyprowski
2015-11-14 11:37             ` Krzysztof Kozlowski
2015-11-14 11:37           ` [PATCH v2 1/4] ARM: dts: exynos4: add rotator nodes Krzysztof Kozlowski
2015-11-13  2:29   ` [PATCH 01/25] " Krzysztof Kozlowski
2015-11-13  8:32     ` Marek Szyprowski
2015-11-13  8:36       ` Krzysztof Kozlowski
2015-11-10 13:23 ` [PATCH 02/25] ARM: dts: exynos542x: add rotator node Marek Szyprowski
2015-11-13  2:28   ` Krzysztof Kozlowski
2015-11-10 13:23 ` [PATCH 03/25] drm/exynos: gsc: prepare and unprepare gsc clock Marek Szyprowski
2015-11-12 15:11   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 04/25] drm/exynos: gsc: fix wrong pm_runtime state Marek Szyprowski
2015-11-12 15:12   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 05/25] drm/exynos: gsc: add device tree support and remove usage of static mappings Marek Szyprowski
2015-11-10 13:23 ` [PATCH 06/25] drm/exynos: fix to calculate offset of each plane for ipp fimc Marek Szyprowski
2015-11-12 15:20   ` Tobias Jakobi
2015-11-13  9:19     ` Marek Szyprowski
2015-11-10 13:23 ` [PATCH 07/25] drm/exynos: fix to calculate offset of each plane for ipp gsc Marek Szyprowski
2015-11-10 13:23 ` [PATCH 08/25] drm/exynos: rotator: convert to common clock framework Marek Szyprowski
2015-11-12 18:13   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 09/25] drm/exynos: exynos7-decon: remove excessive check Marek Szyprowski
2015-11-12 18:15   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 10/25] drm/exynos: move dma_addr attribute from exynos plane to exynos fb Marek Szyprowski
2015-11-12 18:25   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 11/25] drm/exynos: introduce exynos_drm_plane_state structure Marek Szyprowski
2015-11-13 11:46   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 12/25] drm/exynos: mixer: use crtc->state->adjusted_mode instead of crtc->mode Marek Szyprowski
2015-11-13 11:47   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 13/25] drm/exynos: mixer: enable video overlay plane only when VP is available Marek Szyprowski
2015-11-13 11:49   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 14/25] drm/exynos: introduce exynos_drm_plane_config structure Marek Szyprowski
2015-11-13 12:08   ` Gustavo Padovan
2015-11-17 18:00   ` Tobias Jakobi
2015-11-18 10:25     ` Marek Szyprowski
2015-11-18 15:40       ` Tobias Jakobi
2015-11-19 10:34         ` Marek Szyprowski
2015-11-10 13:23 ` [PATCH 15/25] drm/exynos: add generic check for plane state Marek Szyprowski
2015-11-13 12:30   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 16/25] drm/exynos: mixer: use ratio precalculated in exynos_state Marek Szyprowski
2015-11-13 12:35   ` Gustavo Padovan
2015-11-10 13:23 ` [PATCH 17/25] drm/exynos: fix clipping when scalling is enabled Marek Szyprowski
2015-11-17 18:17   ` Tobias Jakobi
2015-11-10 13:23 ` [PATCH 18/25] drm/exynos: fimd: fix dma burst size setting for small plane size Marek Szyprowski
2015-11-12 15:17   ` Tobias Jakobi
2015-11-12 15:23     ` Daniel Stone
2015-11-10 13:23 ` [PATCH 19/25] drm/exynos: add fb pointer to exynos_drm_plane_state Marek Szyprowski
2015-11-10 13:23 ` [PATCH 20/25] drm/exynos: gem: set default alignment for dumb GEM buffers Marek Szyprowski
2015-11-10 13:23 ` [PATCH 21/25] drm/exynos: gem: remove old unused prototypes Marek Szyprowski
2015-11-10 13:23 ` [PATCH 22/25] drm/exynos: gem: simplify access to exynos gem object Marek Szyprowski
2015-11-10 13:23 ` [PATCH 23/25] drm/exynos: ipp: make framework context global Marek Szyprowski
2015-11-10 13:23 ` [PATCH 24/25] drm/exynos: add generic plane rotation property support Marek Szyprowski
2015-11-10 13:23 ` [PATCH 25/25] drm/exynos: add support for plane scaling Marek Szyprowski
2015-11-10 16:23 ` [PATCH 00/25] Exynos DRM: new life of IPP (Image Post Processing) subsystem Tobias Jakobi
2015-11-11 22:30 ` Emil Velikov
2015-11-12 11:14 ` Daniel Stone
2015-11-12 12:44   ` Tobias Jakobi
2015-11-12 14:46     ` Daniel Stone
2015-11-12 15:10       ` Tobias Jakobi
2015-11-16 11:35       ` Marek Szyprowski
2015-11-16 11:52         ` Daniel Stone
2015-11-17 18:13           ` Tobias Jakobi [this message]

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=564B6E43.9020707@math.uni-bielefeld.de \
    --to=tjakobi@math.uni-bielefeld.de \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=javier@osg.samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sw0312.kim@samsung.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.