Am 24.08.2016 um 11:33 schrieb zhoucm1: > > > On 2016å¹´08æ??18æ?¥ 16:15, Christian König wrote: >> NAK to the whole approach. >> >> If we want to share dependencies in the form of fences between >> devices and especially processes we must use android fences and the >> sync file framework. > Then if we want to share semaphore between devices and processes, we > must re-implement semaphore and move it to kernel side from libdrm, > right? > then bind unused fd to semaphore object, and then export/import fd. > What do you think of it? That is basically what sync_file does. It just doesn't call it semaphore and doesn't use the signal/wait semantic. Instead fences can be added to a sync_file and waited for completion before a command submission is made. Regards, Christian. > > Regards, > David Zhou >> >> Sharing numbers in the form of the IDR is a security nightmare we >> already ran into with the GEM flink design. >> >> Regards, >> Christian. >> >> Am 18.08.2016 um 09:50 schrieb Chunming Zhou: >>> If we want to share semaphore/dependency across process across >>> device, we >>> must make ctx id be global, so that we can index it everywhere. >>> >>> Chunming Zhou (6): >>> drm/amdgpu: use global ctx mgr instead of vm specified >>> drm/amdgpu: clean up for amdgpu ctx >>> drm/amdgpu: allocate progressively higher ids for ctx until idr >>> counter wraps >>> drm/amdgpu: ctx id should be removed when ctx is freed >>> drm/amdgpu: use fence-array for ctx release >>> drm/amdgpu: dependency is already signaled if ctx has been freed >>> >>> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 17 ++-- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 142 >>> ++++++++++++++++++-------------- >>> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 + >>> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 4 - >>> 5 files changed, 92 insertions(+), 83 deletions(-) >>> >> >