Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-12 Thread Christian König
Am 12.04.2017 um 05:58 schrieb Dave Airlie: On 12 April 2017 at 13:34, Mao, David 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

RE: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Mao, David
@lists.freedesktop.org Subject: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1) From: Dave Airlie This creates a new command submission chunk for amdgpu to add wait and signal sync objects around the submission. Sync objects are managed via the drm syncobj ioctls. The command

RE: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Mao, David
est Regards, David -Original Message- From: Dave Airlie [mailto:airl...@gmail.com] Sent: Wednesday, April 12, 2017 11:58 AM To: Mao, David Cc: amd-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Subject: Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1) On 12 April 2017 at

Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Dave Airlie
On 12 April 2017 at 13:34, Mao, David 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 submiss

RE: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Mao, David
; dri-devel@lists.freedesktop.org Subject: Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1) On 12 April 2017 at 12:49, Mao, David wrote: > But how to handle the semaphore wait in the vkQueuePresentkHR? The problem here is that really we'd want the presenting process to d

RE: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Mao, David
: Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1) On 12 April 2017 at 12:36, Mao, David wrote: > Does it means we have to submit command to trigger the semaphore wait/signal? Yes, but I think that should be fine, we need to submit a job to the scheduler to get the waits

Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Dave Airlie
On 12 April 2017 at 12:49, Mao, David wrote: > But how to handle the semaphore wait in the vkQueuePresentkHR? The problem here is that really we'd want the presenting process to do the signal once it submits the work for actual presentations (be that the X server DDX or whatever). However that i

Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Dave Airlie
On 12 April 2017 at 12:36, Mao, David wrote: > Does it means we have to submit command to trigger the semaphore wait/signal? Yes, but I think that should be fine, we need to submit a job to the scheduler to get the waits to happen or to have a fence to fill into the signals. Dave. __

Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Dave Airlie
On 11 April 2017 at 22:42, Chris Wilson wrote: > On Tue, Apr 11, 2017 at 01:22:20PM +1000, Dave Airlie wrote: >> +static int amdgpu_sem_lookup_and_sync(struct amdgpu_cs_parser *p, >> + uint32_t handle) >> +{ >> + int r; >> + struct dma_fence *old_fence; >>

Re: [PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-11 Thread Chris Wilson
On Tue, Apr 11, 2017 at 01:22:20PM +1000, Dave Airlie wrote: > +static int amdgpu_sem_lookup_and_sync(struct amdgpu_cs_parser *p, > + uint32_t handle) > +{ > + int r; > + struct dma_fence *old_fence; > + > + r = drm_syncobj_swap_fences(p->filp, handle,

[PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)

2017-04-10 Thread Dave Airlie
From: Dave Airlie This creates a new command submission chunk for amdgpu to add wait and signal sync objects around the submission. Sync objects are managed via the drm syncobj ioctls. The command submission interface is enhanced with two new chunks, one for semaphore waiting, one for semaphore