All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Mao, David" <David.Mao-5C7GfCeVMHo@public.gmane.org>
Cc: "dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)
Date: Wed, 12 Apr 2017 13:58:01 +1000	[thread overview]
Message-ID: <CAPM=9twr+ZNJDe-uCQNUxTavr_W8+AEGygc1V8ei6Q0PaLRhtw@mail.gmail.com> (raw)
In-Reply-To: <BN4PR12MB07879A581F0E3C7AE9FDA20CEE030-aH9FTdWx9BancvD3hK8fMAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

On 12 April 2017 at 13:34, Mao, David <David.Mao@amd.com> wrote:
> My point is it is reasonable to split the semaphore signal/wait with the command submission.
> For the signal ioctl, we could just pick the last fence in the same schedule context, and we don't need to ask for a explicit flush or a dummy submission trick.
> The spec guarantee the signal always comes before the wait, which means, we could always get the valid fence. For the kernel sem object.

I'm a bit vague on the schedule contexts stuff, but does anything
guarantee the X server present operation be in the same schedule
context?

This might be something for Christian to chime in on, we could I
suppose add ioctls to avoid the dummy CS submission, we could also
make dummy
CS submission simpler, if we submit no IBs then we could just have it
deal with the semaphores for those cases and avoid any explicit
flushes,
which saves reproducing the logic to wait and sync.

But at least for the wait case, we need to send something to the
scheduler to wait on, and that looks like the CS ioctl we have now
pretty much,
For the signal case there might be a better argument that an explicit
signal with last fence on this ctx could be used, however at least
with the way
radv works now, we definitely know the X server is finished with the
present buffer as it tells us via its own sync logic, at that point
radv submits
an empty CS with the signal semaphores, we'd really want to pass a
semaphore between the X server and client to do this perfectly.

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

  parent reply	other threads:[~2017-04-12  3:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11  3:22 [repost] drm sync objects cleaned up Dave Airlie
2017-04-11  3:22 ` [PATCH 1/8] sync_file: add type/flags to sync file object creation Dave Airlie
     [not found] ` <20170411032220.21101-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-11  3:22   ` [PATCH 2/8] sync_file: export some interfaces needed by drm sync objects Dave Airlie
2017-04-11  3:22   ` [PATCH 4/8] sync_file: add a mutex to protect fence and callback members. (v4) Dave Airlie
2017-04-11  3:22   ` [PATCH 6/8] drm/syncobj: add semaphore support helpers Dave Airlie
2017-04-11  3:22   ` [PATCH 7/8] amdgpu/cs: split out fence dependency checking Dave Airlie
2017-04-11  3:22   ` [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1) Dave Airlie
     [not found]     ` <20170411032220.21101-9-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-11 12:42       ` Chris Wilson
     [not found]         ` <20170411124217.GC7895-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-12  2:31           ` Dave Airlie
2017-04-12  2:36       ` Mao, David
     [not found]         ` <BN4PR12MB0787C6D1CD93D0FCB6F2069DEE030-aH9FTdWx9BancvD3hK8fMAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-04-12  2:44           ` Dave Airlie
     [not found]             ` <CAPM=9txg84JzHVOpA7mfp4774gT_TLcEiya5fXu9cMTSFdWYWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12  2:49               ` Mao, David
2017-04-12  3:17                 ` Dave Airlie
2017-04-12  3:34                   ` Mao, David
     [not found]                     ` <BN4PR12MB07879A581F0E3C7AE9FDA20CEE030-aH9FTdWx9BancvD3hK8fMAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-04-12  3:58                       ` Dave Airlie [this message]
     [not found]                         ` <CAPM=9twr+ZNJDe-uCQNUxTavr_W8+AEGygc1V8ei6Q0PaLRhtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12  4:13                           ` Mao, David
2017-04-12  8:27                           ` Christian König
2017-04-14  9:45   ` [repost] drm sync objects cleaned up Chris Wilson
     [not found]     ` <20170414094520.GB12532-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-18 19:34       ` Dave Airlie
     [not found]         ` <CAPM=9twmJPkzEL7sFOSAURAVKd7yhKn3dEk=C=vJMQT11sAQQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-18 20:30           ` Chris Wilson
     [not found]             ` <20170418203037.GB9029-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-18 21:55               ` Jason Ekstrand
2017-04-18 23:54                 ` Dave Airlie
2017-04-11  3:22 ` [PATCH 3/8] drm: introduce sync objects as sync file objects with no fd (v2) Dave Airlie
2017-04-11  3:22 ` [PATCH 5/8] sync_file: add support for a semaphore object Dave Airlie
     [not found]   ` <20170411032220.21101-6-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-11  7:50     ` Chris Wilson
2017-04-12  2:36       ` Dave Airlie
     [not found]         ` <CAPM=9tzgNoSXPoZfJbRcoRmGZL9gENo+TTZCbauMjB7mwayZxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12 10:31           ` Chris Wilson
     [not found]             ` <20170412103116.GL4250-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-12 19:05               ` Dave Airlie
     [not found]                 ` <CAPM=9tyiKAH-T2rxwcqxc=LWZ8o_5TyxV3GVhy_JKZv3PZQsCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12 20:01                   ` Chris Wilson
     [not found]                     ` <20170412200132.GJ12532-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-12 20:39                       ` Chris Wilson
2017-04-12 20:51                         ` Dave Airlie
     [not found]                           ` <CAPM=9tyk2NvVTfzEmm+psYv2BfL3xNKhEq_CE7gGeHmS3R9BMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12 21:13                             ` Chris Wilson
2017-04-12 21:41                               ` Dave Airlie
     [not found]                                 ` <CAPM=9tzx8TjPUQ0qH0j=b=U_RyGerCjCNb+2feTuuONB9iRkqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-12 22:34                                   ` Chris Wilson
     [not found]                                     ` <20170412223438.GQ12532-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2017-04-12 22:42                                       ` Dave Airlie

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='CAPM=9twr+ZNJDe-uCQNUxTavr_W8+AEGygc1V8ei6Q0PaLRhtw@mail.gmail.com' \
    --to=airlied-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=David.Mao-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-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.