From: Inki Dae <inki.dae@samsung.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: "Rob Clark" <robdclark@gmail.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Riley Andrews" <riandrews@android.com>,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
"John Harrison" <John.C.Harrison@intel.com>
Subject: Re: [RFC 0/6] drm/fences: add in-fences to DRM
Date: Tue, 29 Mar 2016 11:18:59 +0900 [thread overview]
Message-ID: <56F9E613.1030902@samsung.com> (raw)
In-Reply-To: <CAPj87rPJj0E_WvKCfGbANoXT9w6ns2k3mnNWvo5LZFfqtN1RGQ@mail.gmail.com>
Hi Daniel,
2016년 03월 28일 22:26에 Daniel Stone 이(가) 쓴 글:
> Hi Inki,
>
> On 28 March 2016 at 02:26, Inki Dae <inki.dae@samsung.com> wrote:
>> 2016년 03월 25일 21:10에 Daniel Stone 이(가) 쓴 글:
>>> Second, really. Vulkan avoids implicit sync entirely, and exposes
>>> fence-like primitives throughout its whole API. These include being
>>> able to pass prerequisite fences for display (what Gustavo is adding
>>> here: something to block on before display), and also when the user
>>> acquires a buffer as a render target, it is given another prerequisite
>>> fence (the other side of what Gustavo is suggesting, i.e. the fence
>>> triggers when the buffer is no longer displayed and becomes available
>>> for rendering).
>>>
>>> In order to implement this correctly, and avoid performance bubbles,
>>> we need a primitive like this exposed through the KMS API, from both
>>> sides. This is especially important when you take the case of
>>> userspace suballocation, where userspace allocates larger blocks and
>>> divides the allocation internally for different uses. Implicit sync
>>> does not work at all for that case.
>>
>> Can you give me more details why implicit sync cannot take care of the case of userspace suballocation?
>
> Implicit sync does not know about suballocation, so implicit will
> operate for every range in the buffer, not just the one you want.
>
> Say you have one kernel buffer, which userspace subdivides into four
> independent buffers. It can perform operations on these buffers which
> are completely independent of each other, and an explicit sync model
> allows this independence to be kept. Implicit sync ties them together,
> so that you cannot do any operations on buffer 1 until all operations
> on buffer 2 have completed.
>
>> And is there any reason that fence fd shouldn't dependent of DMABUF - now fence fd is a new file, not DMABUF fd?
>
> Because dmabuf is for buffer sharing, and fences aren't buffers (they
> will never export page ranges). Is there any particular benefit you
> think you would get from doing this?
Just for consistency. As you know, implicit sync hangs DMA fence up on dmabuf object through reservation object so dmabuf independent explicit sync looked strange to me.
As you mentioned above, the suballocation would be why explicit sync should be indepenent of DMABUF.
In addition, I wonder how explicit and implicit fences could coexist together.
Rob said,
"Implicit sync ofc remains the default, but userspace could opt-in to explicit sync instead"
This would mean that if we use explicit sync for user-space then it coexists with implicit sync. However, these two sync fences can't see same DMA buffer because explicit fence has a different file object from implicit one.
So in this case, I think explicit fence would need to be hung up on the reservation object of dmabuf object somehow. Otherwise, although they coexist together, are these fences - explicit and implicit - used for differenct purpose separately?
Thanks,
Inki Dae
>
>>> good thing. This is also the model that ChromeOS is moving towards, so
>>> it becomes more important from that point of view as well.
>>
>> I think Gustavo should had explaned this path series enough to other people when posting them - ie, what relationship explict and implicit fences have, and why implicit fence - which is independent of DMABUF - is required, and what use cases there are in real users, and etc.
>
> Fair enough, the summary could perhaps contain something like this.
>
> Cheers,
> Daniel
>
>
next prev parent reply other threads:[~2016-03-29 2:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 18:47 [RFC 0/6] drm/fences: add in-fences to DRM Gustavo Padovan
2016-03-23 18:47 ` [RFC 1/6] drm/fence: add FENCE_FD property to planes Gustavo Padovan
2016-04-05 12:36 ` Rob Clark
2016-04-05 12:57 ` Daniel Stone
2016-04-05 14:04 ` Rob Clark
2016-04-05 14:19 ` Daniel Stone
2016-04-05 15:23 ` Rob Clark
2016-03-23 18:47 ` [RFC 2/6] dma-buf/fence: add struct fence_collection Gustavo Padovan
2016-03-23 18:47 ` [RFC 3/6] dma-buf/sync_file: add sync_file_fences_get() Gustavo Padovan
2016-03-23 18:47 ` [RFC 4/6] dma-buf/fence: add fence_collection_put() Gustavo Padovan
2016-03-23 18:47 ` [RFC 5/6] dma-buf/fence: add fence_collection_wait() Gustavo Padovan
2016-03-23 18:47 ` [RFC 6/6] drm/fence: support fence_collection on atomic commit Gustavo Padovan
2016-03-24 7:20 ` [RFC 0/6] drm/fences: add in-fences to DRM Maarten Lankhorst
2016-03-24 14:31 ` Gustavo Padovan
2016-03-24 8:18 ` Inki Dae
2016-03-24 14:39 ` Gustavo Padovan
2016-03-24 23:03 ` Inki Dae
2016-03-24 15:40 ` Rob Clark
2016-03-24 23:49 ` Inki Dae
2016-03-25 11:58 ` Rob Clark
2016-03-25 12:10 ` Daniel Stone
2016-03-28 1:26 ` Inki Dae
2016-03-28 13:26 ` Daniel Stone
2016-03-29 2:18 ` Inki Dae [this message]
2016-03-29 13:23 ` Rob Clark
2016-03-31 7:45 ` Inki Dae
2016-03-31 9:35 ` Daniel Stone
2016-03-31 10:04 ` Daniel Vetter
2016-03-31 11:40 ` Inki Dae
2016-03-31 10:05 ` Inki Dae
2016-03-31 10:56 ` Daniel Stone
2016-03-31 11:26 ` Inki Dae
2016-03-31 11:41 ` Daniel Stone
2016-03-31 14:10 ` Rob Clark
2016-04-04 0:14 ` Inki Dae
2016-04-04 15:41 ` Rob Clark
2016-04-04 15:46 ` Rob Clark
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=56F9E613.1030902@samsung.com \
--to=inki.dae@samsung.com \
--cc=John.C.Harrison@intel.com \
--cc=arve@android.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
--cc=robdclark@gmail.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