summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-05-18 07:19:53 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-05-18 14:55:11 -0400
commitabec0ddc19b89822138f3c8970516eed4d0e17d9 (patch)
treef788095b1bc9118c9afac81c77d27bd0044ac5ad /drivers/gpu/nvgpu/gk20a/fence_gk20a.c
parentdc45473eeb39d93100290a0f09bd787b3a5ce3f2 (diff)
gpu: nvgpu: use mem_desc for semaphores
Replace manual buffer allocation and cpu_va pointer accesses with gk20a_gmmu_{alloc,free}() and gk20a_mem_{rd,wr}() using a struct mem_desc in gk20a_semaphore_pool, for buffer aperture flexibility. JIRA DNVGPU-23 Change-Id: I394c38f407a9da02480bfd35062a892eec242ea3 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1146684 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index 1bda5902..fe38ae57 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -154,17 +154,9 @@ struct gk20a_fence *gk20a_fence_from_semaphore(
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#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
158 sync_fence = gk20a_sync_fence_create(timeline, semaphore, 157 sync_fence = gk20a_sync_fence_create(timeline, semaphore,
159 dependency, "f-gk20a-0x%04llx", 158 dependency, "f-gk20a-0x%04x",
160 ((uintptr_t)(void *)semaphore->value) & 159 semaphore->offset & 0xffff);
161 0xffff);
162#else
163 sync_fence = gk20a_sync_fence_create(timeline, semaphore,
164 dependency, "f-gk20a-0x%04llx",
165 ((u64)(void *)semaphore->value) &
166 0xffff);
167#endif
168 if (!sync_fence) 160 if (!sync_fence)
169 return NULL; 161 return NULL;
170#endif 162#endif