summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/sync_gk20a.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
new file mode 100644
index 00000000..7d7aff6d
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h
@@ -0,0 +1,58 @@
1/*
2 * drivers/video/tegra/host/gk20a/sync_gk20a.h
3 *
4 * GK20A Sync Framework Integration
5 *
6 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24 * DEALINGS IN THE SOFTWARE.
25 */
26
27#ifndef _GK20A_SYNC_H_
28#define _GK20A_SYNC_H_
29
30struct sync_timeline;
31struct sync_fence;
32struct sync_pt;
33struct nvgpu_semaphore;
34struct fence;
35
36int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence);
37struct nvgpu_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f);
38
39#ifdef CONFIG_SYNC
40struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...);
41void gk20a_sync_timeline_destroy(struct sync_timeline *);
42void gk20a_sync_timeline_signal(struct sync_timeline *);
43struct sync_fence *gk20a_sync_fence_create(
44 struct gk20a *g,
45 struct sync_timeline *,
46 struct nvgpu_semaphore *,
47 const char *fmt, ...);
48struct sync_fence *gk20a_sync_fence_fdget(int fd);
49#else
50static inline void gk20a_sync_timeline_destroy(struct sync_timeline *obj) {}
51static inline void gk20a_sync_timeline_signal(struct sync_timeline *obj) {}
52static inline struct sync_fence *gk20a_sync_fence_fdget(int fd)
53{
54 return NULL;
55}
56#endif
57
58#endif