summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-06-15 12:36:11 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-20 15:26:50 -0400
commit0258721eb1e4b6be4217b1e7090a9f4073c7805a (patch)
tree797df5e404b2670e843bebaa169bf170a189eb2c /drivers/gpu/nvgpu/gk20a
parent84536b929be7e56dd8221ba8d541fd4cbcd149ed (diff)
gpu: nvgpu: Do not use NO_KERNEL_MAPPING for GR
With arm64 mapping buffers to CPU is free. Remove the use of NO_KERNEL_MAPPING. Change-Id: Ic99ca6b7f8c698e2d3cb1d61a821939798bb237b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1753709 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@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')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 7c51afca..28ccb896 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1780,8 +1780,7 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
1780 if (enable_hwpm_ctxsw) { 1780 if (enable_hwpm_ctxsw) {
1781 /* Allocate buffer if necessary */ 1781 /* Allocate buffer if necessary */
1782 if (pm_ctx->mem.gpu_va == 0) { 1782 if (pm_ctx->mem.gpu_va == 0) {
1783 ret = nvgpu_dma_alloc_flags_sys(g, 1783 ret = nvgpu_dma_alloc_sys(g,
1784 NVGPU_DMA_NO_KERNEL_MAPPING,
1785 g->gr.ctx_vars.pm_ctxsw_image_size, 1784 g->gr.ctx_vars.pm_ctxsw_image_size,
1786 &pm_ctx->mem); 1785 &pm_ctx->mem);
1787 if (ret) { 1786 if (ret) {
@@ -2530,8 +2529,7 @@ int gk20a_gr_alloc_ctx_buffer(struct gk20a *g,
2530 if (nvgpu_mem_is_valid(&desc->mem)) 2529 if (nvgpu_mem_is_valid(&desc->mem))
2531 return 0; 2530 return 0;
2532 2531
2533 err = nvgpu_dma_alloc_flags_sys(g, NVGPU_DMA_NO_KERNEL_MAPPING, 2532 err = nvgpu_dma_alloc_sys(g, size, &desc->mem);
2534 size, &desc->mem);
2535 if (err) 2533 if (err)
2536 return err; 2534 return err;
2537 2535
@@ -2828,9 +2826,7 @@ int gr_gk20a_alloc_gr_ctx(struct gk20a *g,
2828 gr->ctx_vars.buffer_size = gr->ctx_vars.golden_image_size; 2826 gr->ctx_vars.buffer_size = gr->ctx_vars.golden_image_size;
2829 gr->ctx_vars.buffer_total_size = gr->ctx_vars.golden_image_size; 2827 gr->ctx_vars.buffer_total_size = gr->ctx_vars.golden_image_size;
2830 2828
2831 err = nvgpu_dma_alloc_flags(g, NVGPU_DMA_NO_KERNEL_MAPPING, 2829 err = nvgpu_dma_alloc(g, gr->ctx_vars.buffer_total_size, &gr_ctx->mem);
2832 gr->ctx_vars.buffer_total_size,
2833 &gr_ctx->mem);
2834 if (err) 2830 if (err)
2835 return err; 2831 return err;
2836 2832
@@ -2933,7 +2929,7 @@ static int gr_gk20a_alloc_channel_patch_ctx(struct gk20a *g,
2933 nvgpu_log(g, gpu_dbg_info, "patch buffer size in entries: %d", 2929 nvgpu_log(g, gpu_dbg_info, "patch buffer size in entries: %d",
2934 alloc_size); 2930 alloc_size);
2935 2931
2936 err = nvgpu_dma_alloc_map_flags_sys(ch_vm, NVGPU_DMA_NO_KERNEL_MAPPING, 2932 err = nvgpu_dma_alloc_map_sys(ch_vm,
2937 alloc_size * sizeof(u32), &patch_ctx->mem); 2933 alloc_size * sizeof(u32), &patch_ctx->mem);
2938 if (err) 2934 if (err)
2939 return err; 2935 return err;