All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
To: Chris Wilson
	<chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>,
	Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
Cc: intel-gfx
	<intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	amd-gfx list
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	dri-devel
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [Intel-gfx] RFC: Add write flag to reservation object fences
Date: Fri, 10 Aug 2018 10:24:08 +0200	[thread overview]
Message-ID: <4e16823b-ea25-47ff-f2f5-ef2425a08b83@amd.com> (raw)
In-Reply-To: <153388746770.6849.17431969057959926472@skylake-alporthouse-com>

Am 10.08.2018 um 09:51 schrieb Chris Wilson:
> Quoting Christian König (2018-08-09 15:54:31)
>> Am 09.08.2018 um 16:22 schrieb Daniel Vetter:
>>> On Thu, Aug 9, 2018 at 3:58 PM, Christian König
>>> <ckoenig.leichtzumerken@gmail.com> wrote:
>>>> Am 09.08.2018 um 15:38 schrieb Daniel Vetter:
>>>>> On Thu, Aug 09, 2018 at 01:37:07PM +0200, Christian König wrote:
>>>>> [SNIP]
>>>> See to me the explicit fence in the reservation object is not even remotely
>>>> related to implicit or explicit synchronization.
>>> Hm, I guess that's the confusion then. The only reason we have the
>>> exclusive fence is to implement cross-driver implicit syncing. What
>>> else you do internally in your driver doesn't matter, as long as you
>>> keep up that contract.
>>>
>>> And it's intentionally not called write_fence or anything like that,
>>> because that's not what it tracks.
>>>
>>> Of course any buffer moves the kernel does also must be tracked in the
>>> exclusive fence, because userspace cannot know about these. So you
>>> might have an exclusive fence set and also an explicit fence passed in
>>> through the atomic ioctl. Aside: Right now all drivers only observe
>>> one or the other, not both, so will break as soon as we start moving
>>> shared buffers around. At least on Android or anything else using
>>> explicit fencing.
>> Actually both radeon and nouveau use the approach that shared fences
>> need to wait on as well when they don't come from the current driver.
> nouveau has write hazard tracking in its api , and is using the
> excl fence for it was well.
>
> As far as I can tell, this is all about fixing the lack of
> acknowledgement of the requirement for implicit fence tracking in
> amdgpu's (and its radeon predecessor) ABI.

Well I agree that implicit fencing was a bad idea to begin with, but the 
solution you guys came up with is not going to work in all cases either.

> Which is fine so long as you
> get userspace to only use explicit fence passing to the compositor.

Well exactly that's the problem.

I can't pass exactly one explicit fence to the compositor because I have 
multiple command submissions which run asynchronously and need to finish 
before the compositor can start to use the surface.

So the whole concept of using a single exclusive fence doesn't work in 
the case of amdgpu. And to be honest I think all drivers with multiple 
engines could benefit of that as well.

Christian.

> -Chris

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2018-08-10  8:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 11:37 RFC: Add write flag to reservation object fences Christian König
     [not found] ` <20180809113713.48024-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-09 11:37   ` [PATCH 1/6] dma-buf: remove shared fence staging in reservation object Christian König
2018-08-09 12:08     ` Chris Wilson
2018-08-09 12:22       ` Christian König
2018-08-09 11:37   ` [PATCH 2/6] dma-buf: add reservation object shared fence accessor Christian König
     [not found]     ` <20180809113713.48024-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-10  7:41       ` Huang Rui
2018-08-09 11:37   ` [PATCH 5/6] drm/i915: wait for write fences before pflip Christian König
2018-08-09 11:37   ` [PATCH 6/6] drm/amdgpu: remove exclusive fence workaround Christian König
2018-08-09 11:37 ` [PATCH 3/6] dma-buf: add is_write to reservation_object_add_shared_fence Christian König
2018-08-09 11:37 ` [PATCH 4/6] dma-buf: add writes_only flag to reservation_object_get_fences_rcu Christian König
2018-08-09 11:53 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] dma-buf: remove shared fence staging in reservation object Patchwork
2018-08-09 13:38 ` RFC: Add write flag to reservation object fences Daniel Vetter
2018-08-09 13:58   ` Christian König
     [not found]     ` <154cc05d-f2e1-695a-5bd3-a2fd5d40a548-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-09 14:22       ` Daniel Vetter
     [not found]         ` <CAKMK7uHgwFr1P3s=TcZ_NMuexCwoO1FkEn9q3CaYaGyBKviB-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-09 14:54           ` Christian König
     [not found]             ` <9731d8b0-238b-d64d-9f80-4f549eb230b9-5C7GfCeVMHo@public.gmane.org>
2018-08-10  7:51               ` [Intel-gfx] " Chris Wilson
2018-08-10  8:24                 ` Christian König [this message]
2018-08-10  8:32                   ` Daniel Vetter
2018-08-10  8:51                     ` Christian König
     [not found]                       ` <97e6154a-380c-521c-6287-6fbafe0384b4-5C7GfCeVMHo@public.gmane.org>
2018-08-10  9:25                         ` [Intel-gfx] " Daniel Vetter
2018-08-10  8:29               ` Daniel Vetter
     [not found]                 ` <CAKMK7uH2ZvkmTVcPJwKjouxdvrLKVXBVGSFKAD5rtQrXLoX_GQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-10  9:14                   ` Christian König
2018-08-10  9:21                     ` Daniel Vetter
2018-08-10 14:24                       ` Christian König
2018-08-10  9:28                     ` Daniel Vetter

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=4e16823b-ea25-47ff-f2f5-ef2425a08b83@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org \
    --cc=daniel-/w4YWyX8dFk@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 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.