gpu: nvgpu: add dma_fence semaphore support

Support exporting and importing semaphore-based synchronization with the
stable dma-fence API. The "Android" sync fence API used until now is
deprecated.

The Android sync framework is still kept as the default.

Jira NVGPU-5353

Change-Id: I9e57947adeb4d2ef5d59135ed7d008553c44f97c
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2336119
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2020-04-21 14:21:06 +03:00
committed by Alex Waterman
parent 7d6645d7af
commit 23d6b36101
14 changed files with 641 additions and 8 deletions

View File

@@ -56,11 +56,16 @@ struct nvgpu_error_notifier {
};
/*
* This struct contains fence_related data.
* e.g. sync_timeline for sync_fences.
* channel-global data for sync fences created from the hardware
* synchronization primitive in each particular channel.
*/
struct nvgpu_os_fence_framework {
#if defined(CONFIG_NVGPU_SYNCFD_ANDROID)
struct sync_timeline *timeline;
#elif defined(CONFIG_NVGPU_SYNCFD_STABLE)
u64 context;
bool exists;
#endif
};
struct nvgpu_usermode_bufs_linux {