Shared semaphores for amdgpu
Dave Airlie
airlied at gmail.com
Fri Mar 10 04:27:11 UTC 2017
On 10 March 2017 at 13:25, Dave Airlie <airlied at gmail.com> wrote:
>>
>> As far as I can see the only functionality we are missing here is:
>>
>> void sync_file_signal(struct sync_file *sync_file, struct dma_fence *fence)
>> {
>> dma_fence_put(sync_file->fence);
>> sync_file->fence = fence;
>> }
>>
>> We probably should do this atomically, but that is only a matter of taking
>> locks/atomic pointer operation.
>>
>> The waiting is done using the normal sync_file_get_fence() function.
>>
>> The rest is David's patch to import/export the fd handle into a local idr
>> based handle.
>
> Are you suggesting we start keeping track of sync_file objects in a local idr?
>
> As currently they are only tracked as files, which is probably not what we want
> for every unshared semaphore, or are you thinking more that the amdgpu local
> sem should be just storing a sync_file pointer, rather than what it does now.
Okay here's a first pass at what I think you mean, it's missing
things, but the idea
should be what you said.
Dave.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RFC-drm-amdgpu-add-shared-semaphores-support.-sync_f.patch
Type: text/x-patch
Size: 16954 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170310/d68e630b/attachment-0001.bin>
More information about the amd-gfx
mailing list