From 84dadb1a9ae2ab0473976ebf5ece1cb0d1e60205 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 12 Apr 2017 11:27:48 -0700 Subject: gpu: nvgpu: Move semaphore impl to nvgpu_mem Use struct nvgpu_mem for DMA allocations (and the corresponding nvgpu_dma_alloc_sys()) instead of custom rolled code. This migrates away from using linux scatter gather tables directly. Instead this is hidden in the nvgpu_mem struct. With this change the semaphore.c code no longer has any direct Linux dependencies. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: I92167c98aac9b413ae87496744dcee051cd60207 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1464081 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: svccoveritychecker --- 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 b509c5c4..3fb35e94 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c @@ -576,16 +576,16 @@ static void add_sema_cmd(struct gk20a *g, struct channel_gk20a *c, } if (acquire) - gpu_sema_verbose_dbg("(A) c=%d ACQ_GE %-4u owner=%-3d" + gpu_sema_verbose_dbg(g, "(A) c=%d ACQ_GE %-4u owner=%-3d" "va=0x%llx cmd_mem=0x%llx b=0x%llx off=%u", ch, nvgpu_semaphore_get_value(s), s->hw_sema->ch->hw_chid, va, cmd->gva, cmd->mem->gpu_va, ob); else - gpu_sema_verbose_dbg("(R) c=%d INCR %u (%u) va=0x%llx " + gpu_sema_verbose_dbg(g, "(R) c=%d INCR %u (%u) va=0x%llx " "cmd_mem=0x%llx b=0x%llx off=%u", ch, nvgpu_semaphore_get_value(s), - readl(s->hw_sema->value), va, cmd->gva, + nvgpu_semaphore_read(s), va, cmd->gva, cmd->mem->gpu_va, ob); } -- cgit v1.2.2