[PATCH 8/8] amdgpu: use sync file for shared semaphores (v2.1)
Dave Airlie
airlied at gmail.com
Wed Apr 12 02:31:24 UTC 2017
On 11 April 2017 at 22:42, Chris Wilson <chris at chris-wilson.co.uk> 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;
>> +
>> + r = drm_syncobj_swap_fences(p->filp, handle, NULL, &old_fence);
>> + if (r)
>> + return r;
>
> I'm a bit puzzled over this interface as this means that all
> in-semaphores are not reusable. That seems a bit odd as it means
> userspace can't use the results from one engine on two+ parallel
> engines. Searching kronos for VkSemaphore
> https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkSemaphore.html
> isn't enlightening...
You need to look in the vulkan spec itself.
But yes this is the semantics, vulkan semaphores are explicitly 1:1 objects.
One wait must have one signal. It's a semaphore not a fence, so you can't
have multiple engines getting the results from one semaphore.
Dave.
More information about the amd-gfx
mailing list