From 2fbf6e7afb316d698d0062828876eeed1a1b43b2 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 1 Apr 2014 08:28:44 +0300 Subject: gpu: nvgpu: Allow suppressing WFI on submit Allow suppressing WFI when submitting work and requesting a fence back. Bug 1491545 Change-Id: Ic3d061bb4f116cf7ea68dbd6a1b2ace9f11d0ab5 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/390457 --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 61938f8e..cf239b55 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1450,6 +1450,7 @@ static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, /* we might need two extra gpfifo entries - one for pre fence * and one for post fence. */ const int extra_entries = 2; + bool need_wfi = !(flags & NVHOST_SUBMIT_GPFIFO_FLAGS_SUPPRESS_WFI); if (c->has_timedout) return -ETIMEDOUT; @@ -1549,10 +1550,12 @@ static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, flags & NVHOST_SUBMIT_GPFIFO_FLAGS_SYNC_FENCE) err = c->sync->incr_user_fd(c->sync, &incr_cmd, &c->last_submit_fence, + need_wfi, &fence->syncpt_id); else if (flags & NVHOST_SUBMIT_GPFIFO_FLAGS_FENCE_GET) err = c->sync->incr_user_syncpt(c->sync, &incr_cmd, &c->last_submit_fence, + need_wfi, &fence->syncpt_id, &fence->value); else @@ -1569,7 +1572,8 @@ static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, c->gpfifo.cpu_va[c->gpfifo.put].entry1 = u64_hi32(wait_cmd->gva) | pbdma_gp_entry1_length_f(wait_cmd->size); - trace_write_pushbuffer(c, &c->gpfifo.cpu_va[c->gpfifo.put]); + trace_gk20a_push_cmdbuf(c->g->dev->name, + 0, wait_cmd->size, 0, wait_cmd->ptr); c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); @@ -1594,7 +1598,8 @@ static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, c->gpfifo.cpu_va[c->gpfifo.put].entry1 = u64_hi32(incr_cmd->gva) | pbdma_gp_entry1_length_f(incr_cmd->size); - trace_write_pushbuffer(c, &c->gpfifo.cpu_va[c->gpfifo.put]); + trace_gk20a_push_cmdbuf(c->g->dev->name, + 0, incr_cmd->size, 0, incr_cmd->ptr); c->gpfifo.put = (c->gpfifo.put + 1) & (c->gpfifo.entry_num - 1); -- cgit v1.2.2