summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/sync_gk20a.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
index edfe3deb..f57871d5 100644
--- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c
@@ -20,8 +20,7 @@
20#include <linux/hrtimer.h> 20#include <linux/hrtimer.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/spinlock.h> 23#include <nvgpu/lock.h>
24
25#include <uapi/linux/nvgpu.h> 24#include <uapi/linux/nvgpu.h>
26 25
27#include <nvgpu/semaphore.h> 26#include <nvgpu/semaphore.h>
@@ -55,7 +54,7 @@ struct gk20a_sync_pt {
55 * than a mutex - there should be very little contention on this 54 * than a mutex - there should be very little contention on this
56 * lock. 55 * lock.
57 */ 56 */
58 spinlock_t lock; 57 struct nvgpu_spinlock lock;
59}; 58};
60 59
61struct gk20a_sync_pt_inst { 60struct gk20a_sync_pt_inst {
@@ -242,7 +241,7 @@ static struct gk20a_sync_pt *gk20a_sync_pt_create_shared(
242 } 241 }
243 } 242 }
244 243
245 spin_lock_init(&shared->lock); 244 nvgpu_spinlock_init(&shared->lock);
246 245
247 nvgpu_semaphore_get(sema); 246 nvgpu_semaphore_get(sema);
248 247
@@ -304,7 +303,7 @@ static int gk20a_sync_pt_has_signaled(struct sync_pt *sync_pt)
304#endif 303#endif
305 bool signaled = true; 304 bool signaled = true;
306 305
307 spin_lock(&pt->lock); 306 nvgpu_spinlock_acquire(&pt->lock);
308 if (!pt->sema) 307 if (!pt->sema)
309 goto done; 308 goto done;
310 309
@@ -345,7 +344,7 @@ static int gk20a_sync_pt_has_signaled(struct sync_pt *sync_pt)
345 pt->sema = NULL; 344 pt->sema = NULL;
346 } 345 }
347done: 346done:
348 spin_unlock(&pt->lock); 347 nvgpu_spinlock_release(&pt->lock);
349 348
350 return signaled; 349 return signaled;
351} 350}