diff options
author | Alex Waterman <alexw@nvidia.com> | 2016-06-09 19:03:17 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-16 15:50:28 -0400 |
commit | 03164b0f4abeb06d4b5207531b97f11fe4a860dd (patch) | |
tree | 16d063e9c8999a660eef9e601fc9f6d6ae1bcaaf /drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |
parent | 12661e4a48db6588a3f61a5729aff1eec7a9d17c (diff) |
gpu: nvgpu: Allow nvgpu sync_pts to be introspected
Allow nvgpu to identify sync_pts that were made by nvgpu so that
the underlying data structures can be accessed. This is important
for the semaphore fast-path that allows nvgpu to skip doing a
long CPU wait on a sync_fence.
Bug 1732449
JIRA DNVGPU-12
Change-Id: Iea43de21d2d7a4e75db6b6dbf24efb78ce64d619
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1162688
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.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h index e9c26221..f885febd 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |||
@@ -19,11 +19,23 @@ | |||
19 | #define _GK20A_SYNC_H_ | 19 | #define _GK20A_SYNC_H_ |
20 | 20 | ||
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/version.h> | ||
22 | 23 | ||
23 | struct sync_timeline; | 24 | struct sync_timeline; |
24 | struct sync_fence; | 25 | struct sync_fence; |
25 | struct sync_pt; | 26 | struct sync_pt; |
26 | struct gk20a_semaphore; | 27 | struct gk20a_semaphore; |
28 | struct fence; | ||
29 | |||
30 | int __gk20a_is_gk20a_sync_pt_inst(struct sync_pt *pt); | ||
31 | int gk20a_is_gk20a_sync_pt_inst(struct fence *f); | ||
32 | int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence); | ||
33 | |||
34 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) | ||
35 | struct gk20a_semaphore *gk20a_sync_pt_inst_get_sema(struct fence *f); | ||
36 | #else | ||
37 | struct gk20a_semaphore *gk20a_sync_pt_inst_get_sema(struct sync_pt *pt); | ||
38 | #endif | ||
27 | 39 | ||
28 | #ifdef CONFIG_SYNC | 40 | #ifdef CONFIG_SYNC |
29 | struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); | 41 | struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); |