summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index fbbaa2a7..596dc549 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -148,17 +148,19 @@ struct gk20a_fence *gk20a_fence_from_semaphore(
148 struct gk20a_semaphore *semaphore, 148 struct gk20a_semaphore *semaphore,
149 wait_queue_head_t *semaphore_wq, 149 wait_queue_head_t *semaphore_wq,
150 struct sync_fence *dependency, 150 struct sync_fence *dependency,
151 bool wfi) 151 bool wfi, bool need_sync_fence)
152{ 152{
153 struct gk20a_fence *f; 153 struct gk20a_fence *f;
154 struct sync_fence *sync_fence = NULL; 154 struct sync_fence *sync_fence = NULL;
155 155
156#ifdef CONFIG_SYNC 156#ifdef CONFIG_SYNC
157 sync_fence = gk20a_sync_fence_create(timeline, semaphore, 157 if (need_sync_fence) {
158 sync_fence = gk20a_sync_fence_create(timeline, semaphore,
158 dependency, "f-gk20a-0x%04x", 159 dependency, "f-gk20a-0x%04x",
159 gk20a_semaphore_gpu_ro_va(semaphore)); 160 gk20a_semaphore_gpu_ro_va(semaphore));
160 if (!sync_fence) 161 if (!sync_fence)
161 return NULL; 162 return NULL;
163 }
162#endif 164#endif
163 165
164 f = gk20a_alloc_fence(&gk20a_semaphore_fence_ops, sync_fence, wfi); 166 f = gk20a_alloc_fence(&gk20a_semaphore_fence_ops, sync_fence, wfi);