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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index f41ca767..1bda5902 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/gk20a.h> 16#include <linux/gk20a.h>
17#include <linux/file.h> 17#include <linux/file.h>
18#include <linux/version.h>
18 19
19#include "gk20a.h" 20#include "gk20a.h"
20#include "semaphore_gk20a.h" 21#include "semaphore_gk20a.h"
@@ -153,10 +154,17 @@ struct gk20a_fence *gk20a_fence_from_semaphore(
153 struct sync_fence *sync_fence = NULL; 154 struct sync_fence *sync_fence = NULL;
154 155
155#ifdef CONFIG_SYNC 156#ifdef CONFIG_SYNC
157#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
158 sync_fence = gk20a_sync_fence_create(timeline, semaphore,
159 dependency, "f-gk20a-0x%04llx",
160 ((uintptr_t)(void *)semaphore->value) &
161 0xffff);
162#else
156 sync_fence = gk20a_sync_fence_create(timeline, semaphore, 163 sync_fence = gk20a_sync_fence_create(timeline, semaphore,
157 dependency, "f-gk20a-0x%04llx", 164 dependency, "f-gk20a-0x%04llx",
158 ((u64)(void *)semaphore->value) & 165 ((u64)(void *)semaphore->value) &
159 0xffff); 166 0xffff);
167#endif
160 if (!sync_fence) 168 if (!sync_fence)
161 return NULL; 169 return NULL;
162#endif 170#endif