diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/os_fence.h | 19 |
2 files changed, 24 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h b/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h index 79cc51ea..39d08339 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/os_fence_android.h | |||
@@ -39,4 +39,8 @@ void nvgpu_os_fence_init(struct nvgpu_os_fence *fence_out, | |||
39 | struct gk20a *g, const struct nvgpu_os_fence_ops *fops, | 39 | struct gk20a *g, const struct nvgpu_os_fence_ops *fops, |
40 | struct sync_fence *fence); | 40 | struct sync_fence *fence); |
41 | 41 | ||
42 | #endif \ No newline at end of file | 42 | int nvgpu_os_fence_syncpt_fdget( |
43 | struct nvgpu_os_fence *fence_out, | ||
44 | struct channel_gk20a *c, int fd); | ||
45 | |||
46 | #endif /* __NVGPU_OS_FENCE_ANDROID_H__ */ \ No newline at end of file | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h index c8d24fc2..a22140da 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/os_fence.h +++ b/drivers/gpu/nvgpu/include/nvgpu/os_fence.h | |||
@@ -28,6 +28,7 @@ | |||
28 | struct nvgpu_semaphore; | 28 | struct nvgpu_semaphore; |
29 | struct channel_gk20a; | 29 | struct channel_gk20a; |
30 | struct priv_cmd_entry; | 30 | struct priv_cmd_entry; |
31 | struct nvgpu_nvhost_dev; | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * struct nvgpu_os_fence adds an abstraction to the earlier Android Sync | 34 | * struct nvgpu_os_fence adds an abstraction to the earlier Android Sync |
@@ -108,4 +109,22 @@ static inline int nvgpu_os_fence_fdget( | |||
108 | 109 | ||
109 | #endif /* CONFIG_SYNC */ | 110 | #endif /* CONFIG_SYNC */ |
110 | 111 | ||
112 | #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_SYNC) | ||
113 | |||
114 | int nvgpu_os_fence_syncpt_create(struct nvgpu_os_fence *fence_out, | ||
115 | struct channel_gk20a *c, struct nvgpu_nvhost_dev *nvhost_dev, | ||
116 | u32 id, u32 thresh); | ||
117 | |||
118 | #else | ||
119 | |||
120 | static inline int nvgpu_os_fence_syncpt_create( | ||
121 | struct nvgpu_os_fence *fence_out, struct channel_gk20a *c, | ||
122 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
123 | u32 id, u32 thresh) | ||
124 | { | ||
125 | return -ENOSYS; | ||
126 | } | ||
127 | |||
128 | #endif /* CONFIG_TEGRA_GK20A_NVHOST && CONFIG_SYNC */ | ||
129 | |||
111 | #endif /* __NVGPU_OS_FENCE__ */ | 130 | #endif /* __NVGPU_OS_FENCE__ */ |