diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-06-25 08:47:15 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-28 14:13:35 -0400 |
commit | dd146d42fc910128b0e2987d12b83430bf97bae0 (patch) | |
tree | 23d3f808eb6ea65dd8ab90398a22ff52fce09736 /drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |
parent | 2dda362e6395a6d486ba3d1a75e707933690023e (diff) |
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 <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1760599
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 10 |
1 files changed, 0 insertions, 10 deletions
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, | |||
657 | 657 | ||
658 | mem = &ch_ctx->mem; | 658 | mem = &ch_ctx->mem; |
659 | 659 | ||
660 | if (nvgpu_mem_begin(g, mem)) | ||
661 | return -ENOMEM; | ||
662 | |||
663 | nvgpu_log(g, gpu_dbg_ctxsw, "addr_hi=%x addr_lo=%x count=%d", hi, | 660 | nvgpu_log(g, gpu_dbg_ctxsw, "addr_hi=%x addr_lo=%x count=%d", hi, |
664 | lo, GK20A_FECS_TRACE_NUM_RECORDS); | 661 | lo, GK20A_FECS_TRACE_NUM_RECORDS); |
665 | 662 | ||
@@ -668,14 +665,9 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g, | |||
668 | ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f( | 665 | ctxsw_prog_main_image_context_timestamp_buffer_control_num_records_f( |
669 | GK20A_FECS_TRACE_NUM_RECORDS)); | 666 | GK20A_FECS_TRACE_NUM_RECORDS)); |
670 | 667 | ||
671 | nvgpu_mem_end(g, mem); | ||
672 | |||
673 | if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_VA)) | 668 | if (nvgpu_is_enabled(g, NVGPU_FECS_TRACE_VA)) |
674 | mem = &ch->ctx_header.mem; | 669 | mem = &ch->ctx_header.mem; |
675 | 670 | ||
676 | if (nvgpu_mem_begin(g, mem)) | ||
677 | return -ENOMEM; | ||
678 | |||
679 | nvgpu_mem_wr(g, mem, | 671 | nvgpu_mem_wr(g, mem, |
680 | ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(), | 672 | ctxsw_prog_main_image_context_timestamp_buffer_ptr_o(), |
681 | lo); | 673 | lo); |
@@ -684,8 +676,6 @@ int gk20a_fecs_trace_bind_channel(struct gk20a *g, | |||
684 | ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(hi) | | 676 | ctxsw_prog_main_image_context_timestamp_buffer_ptr_v_f(hi) | |
685 | aperture_mask); | 677 | aperture_mask); |
686 | 678 | ||
687 | nvgpu_mem_end(g, mem); | ||
688 | |||
689 | /* pid (process identifier) in user space, corresponds to tgid (thread | 679 | /* pid (process identifier) in user space, corresponds to tgid (thread |
690 | * group id) in kernel space. | 680 | * group id) in kernel space. |
691 | */ | 681 | */ |