From dd146d42fc910128b0e2987d12b83430bf97bae0 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 25 Jun 2018 15:47:15 +0300 Subject: gpu: nvgpu: don't mem_{begin,end}() for gr Now that GR buffers always have a kernel mapping, remove the unnecessary calls to nvgpu_mem_begin() and nvgpu_mem_end() on these buffers: - global ctx buffer mem in gr - gr ctx mem in a tsg - patch ctx mem in a gr ctx - pm ctx mem in a gr ctx - ctx_header mem in a channel (subctx header) Change-Id: Id2a8ad108aef8db8b16dce5bae8003bbcd3b23e4 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1760599 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index 7e0aee11..59f7fab4 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c @@ -657,9 +657,6 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g, mem = &ch_ctx->mem; - if (nvgpu_mem_begin(g, mem)) - return -ENOMEM; - nvgpu_log(g, gpu_dbg_ctxsw, "addr_hi=%x addr_lo=%x count=%d", hi, lo, GK20A_FECS_TRACE_NUM_RECORDS); @@ -668,14 +665,9 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g, ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f( GK20A_FECS_TRACE_NUM_RECORDS)); - nvgpu_mem_end(g, mem); - if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_VA)) mem = &ch->ctx_header.mem; - if (nvgpu_mem_begin(g, mem)) - return -ENOMEM; - nvgpu_mem_wr(g, mem, ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(), lo); @@ -684,8 +676,6 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g, ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(hi) | aperture_mask); - nvgpu_mem_end(g, mem); - /* pid (process identifier) in user space, corresponds to tgid (thread * group id) in kernel space. */ -- cgit v1.2.2