From 24e1c7e0a729158be36d63b821550d206a8a0436 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 17:08:50 -0800 Subject: gpu: nvgpu: Use new kmem API functions (misc) Use the new kmem API functions in misc gk20a code. Some additional modifications were also made: o Add a struct gk20a pointer to gk20a_fence to enable proper kmem free usage. o Add gk20a pointer to alloc_session() in dbg_gpu_gk20a.c to use kmem API for allocating a session. o Plumb a gk20a pointer through the fence creation and deletion. o Use statically allocated buffers for names in file creation. Bug 1799159 Bug 1823380 Change-Id: I3678080e3ffa1f9bcf6934e3f4819a1bc531689b Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1318323 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index e84f70a2..8baf60dd 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c @@ -667,7 +667,7 @@ static int gk20a_channel_semaphore_wait_fd( ret = __semaphore_wait_fd_fast_path(c, sync_fence, wait_cmd, &fp_sema); if (ret == 0) { if (fp_sema) { - err = gk20a_fence_from_semaphore(fence, + err = gk20a_fence_from_semaphore(c->g, fence, sema->timeline, fp_sema, &c->semaphore_wq, @@ -734,7 +734,7 @@ static int gk20a_channel_semaphore_wait_fd( * that we properly clean up in the event the sync_fence has * already signaled */ - err = gk20a_fence_from_semaphore(fence, sema->timeline, w->sema, + err = gk20a_fence_from_semaphore(c->g, fence, sema->timeline, w->sema, &c->semaphore_wq, NULL, false, false); if (err) goto clean_up_sema; @@ -810,7 +810,7 @@ static int __gk20a_channel_semaphore_incr( /* Release the completion semaphore. */ add_sema_cmd(c->g, c, semaphore, incr_cmd, 14, false, wfi_cmd); - err = gk20a_fence_from_semaphore(fence, + err = gk20a_fence_from_semaphore(c->g, fence, sp->timeline, semaphore, &c->semaphore_wq, dependency, wfi_cmd, -- cgit v1.2.2