From 80a6291c9c5e373a3a534ba100b616b6789fb568 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 25 Apr 2017 13:51:27 -0700 Subject: gpu: nvgpu: Use nvgpu_cond in semaphore wq Change semaphore wait queue to use nvgpu_cond instead of Linux wait queue. JIRA NVGPU-14 Change-Id: I3be5097ded168300b4480e986218d9f4fd6104b1 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1469852 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index 87c4f6be..3964c37d 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c @@ -208,8 +208,8 @@ static int nvgpu_semaphore_fence_wait(struct gk20a_fence *f, long timeout) if (!nvgpu_semaphore_is_acquired(f->semaphore)) return 0; - remain = wait_event_interruptible_timeout( - *f->semaphore_wq, + remain = NVGPU_COND_WAIT_INTERRUPTIBLE( + f->semaphore_wq, !nvgpu_semaphore_is_acquired(f->semaphore), timeout); if (remain == 0 && nvgpu_semaphore_is_acquired(f->semaphore)) @@ -235,7 +235,7 @@ int gk20a_fence_from_semaphore( struct gk20a_fence *fence_out, struct sync_timeline *timeline, struct nvgpu_semaphore *semaphore, - wait_queue_head_t *semaphore_wq, + struct nvgpu_cond *semaphore_wq, bool wfi, bool need_sync_fence) { struct gk20a_fence *f = fence_out; -- cgit v1.2.2