summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-07-28 14:22:53 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-16 00:58:37 -0400
commit7b8cbd2be37643e755ccb204e38c20b17aac28bd (patch)
tree9605958d7a7de7762276c8f1c3be5e44dc2567b4 /drivers/gpu/nvgpu/gk20a/sync_gk20a.h
parent9bd76b7fa08672181c2a0cce747a59664e226964 (diff)
gpu: nvgpu: Greatly simplify the semaphore detection
Greatly simplify and make more robust the gpu semaphore detection in sync_fences. Instead of using a magic number use the parent timeline of sync_pts. This will also work with multi-GPU setups using nvgpu since the timeline ops pointer will be the same across all instances of nvgpu. Bug 1732449 Reviewed-on: http://git-master/r/1203834 (cherry picked from commit 66eeb577eae5d10741fd15f3659e843c70792cd6) Change-Id: I4c6619d70b5531e2676e18d1330724e8f8b9bcb3 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1221042 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/sync_gk20a.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
index f885febd..e5b31471 100644
--- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
@@ -27,15 +27,8 @@ struct sync_pt;
27struct gk20a_semaphore; 27struct gk20a_semaphore;
28struct fence; 28struct fence;
29 29
30int __gk20a_is_gk20a_sync_pt_inst(struct sync_pt *pt);
31int gk20a_is_gk20a_sync_pt_inst(struct fence *f);
32int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence); 30int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence);
33 31struct gk20a_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f);
34#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
35struct gk20a_semaphore *gk20a_sync_pt_inst_get_sema(struct fence *f);
36#else
37struct gk20a_semaphore *gk20a_sync_pt_inst_get_sema(struct sync_pt *pt);
38#endif
39 32
40#ifdef CONFIG_SYNC 33#ifdef CONFIG_SYNC
41struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); 34struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...);