diff options
author | Lauri Peltonen <lpeltonen@nvidia.com> | 2014-02-25 07:44:57 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:57 -0400 |
commit | 954117fe11481b79c9c525f7c75384ac40b64cbe (patch) | |
tree | e252aaef514f3050b8d39eb58f640659df2bda57 /drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |
parent | 1c9aaa1eafcf91fbc29404b449f2bec072c804a5 (diff) |
gpu: nvgpu: Support sync framework with semaphores
Add sync_gk20a.c/h that support creating Android sync fence fd's from
gk20a semaphores.
Bug 1445450
Change-Id: I42272996721ceec38ba5510eae6770720bc9dd10
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: http://git-master/r/374843
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-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 | 46 |
1 files changed, 46 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..49597f06 --- /dev/null +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * drivers/video/tegra/host/gk20a/sync_gk20a.h | ||
3 | * | ||
4 | * GK20A Sync Framework Integration | ||
5 | * | ||
6 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef _GK20A_SYNC_H_ | ||
19 | #define _GK20A_SYNC_H_ | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | struct sync_timeline; | ||
24 | struct sync_fence; | ||
25 | struct sync_pt; | ||
26 | struct gk20a_semaphore; | ||
27 | |||
28 | #ifdef CONFIG_SYNC | ||
29 | struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); | ||
30 | void gk20a_sync_timeline_destroy(struct sync_timeline *); | ||
31 | void gk20a_sync_timeline_signal(struct sync_timeline *); | ||
32 | int gk20a_sync_fence_create(struct sync_timeline *, | ||
33 | struct gk20a_semaphore *, | ||
34 | struct sync_fence *dependency, | ||
35 | const char *fmt, ...); | ||
36 | struct sync_fence *gk20a_sync_fence_fdget(int fd); | ||
37 | #else | ||
38 | static inline void gk20a_sync_timeline_destroy(struct sync_timeline *obj) {} | ||
39 | static inline void gk20a_sync_timeline_signal(struct sync_timeline *obj) {} | ||
40 | static inline struct sync_fence *gk20a_sync_fence_fdget(int fd) | ||
41 | { | ||
42 | return NULL; | ||
43 | } | ||
44 | #endif | ||
45 | |||
46 | #endif | ||