summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2017-11-02 06:34:57 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-08 12:09:08 -0500
commitc22a5af9137394524f76e1f54b4e48fe92714fec (patch)
tree9a8074d57e5e3b67b86cc80c8b3638dbecbce061 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent02d281d0776e2b8305b18823343a2ee972b72657 (diff)
gpu: nvgpu: Remove support for legacy mapping
Make NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL mandatory for all map IOCTLs. We'll clean up the legacy kernel code in subsequent patches. Remove support for NVGPU_AS_IOCTL_MAP_BUFFER. It has been superseded by NVGPU_AS_IOCTL_MAP_BUFFER_EX. Remove legacy definitions to nvgpu_map_buffer_args and the related flags, and update the in-kernel map calls accordingly by switching to the newer definitions. Bug 1902982 Change-Id: Ie9a7f02b8d5d0ec7c3722c4481afab6d39b4fbd0 Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560932 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 3875ec5c..d4d6cd2d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1738,7 +1738,7 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
1738 pm_ctx->mem.gpu_va = nvgpu_gmmu_map(c->vm, 1738 pm_ctx->mem.gpu_va = nvgpu_gmmu_map(c->vm,
1739 &pm_ctx->mem, 1739 &pm_ctx->mem,
1740 pm_ctx->mem.size, 1740 pm_ctx->mem.size,
1741 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 1741 NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE,
1742 gk20a_mem_flag_none, true, 1742 gk20a_mem_flag_none, true,
1743 pm_ctx->mem.aperture); 1743 pm_ctx->mem.aperture);
1744 if (!pm_ctx->mem.gpu_va) { 1744 if (!pm_ctx->mem.gpu_va) {
@@ -2633,7 +2633,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g,
2633 } 2633 }
2634 2634
2635 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, 2635 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size,
2636 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 2636 NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE,
2637 gk20a_mem_flag_none, true, mem->aperture); 2637 gk20a_mem_flag_none, true, mem->aperture);
2638 if (!gpu_va) 2638 if (!gpu_va)
2639 goto clean_up; 2639 goto clean_up;
@@ -2651,7 +2651,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g,
2651 } 2651 }
2652 2652
2653 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, 2653 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size,
2654 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 2654 NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE,
2655 gk20a_mem_flag_none, false, mem->aperture); 2655 gk20a_mem_flag_none, false, mem->aperture);
2656 if (!gpu_va) 2656 if (!gpu_va)
2657 goto clean_up; 2657 goto clean_up;
@@ -2669,7 +2669,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g,
2669 } 2669 }
2670 2670
2671 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, 2671 gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size,
2672 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_TRUE, 2672 NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE,
2673 gk20a_mem_flag_none, true, mem->aperture); 2673 gk20a_mem_flag_none, true, mem->aperture);
2674 if (!gpu_va) 2674 if (!gpu_va)
2675 goto clean_up; 2675 goto clean_up;
@@ -2736,7 +2736,7 @@ int gr_gk20a_alloc_gr_ctx(struct gk20a *g,
2736 gr_ctx->mem.gpu_va = nvgpu_gmmu_map(vm, 2736 gr_ctx->mem.gpu_va = nvgpu_gmmu_map(vm,
2737 &gr_ctx->mem, 2737 &gr_ctx->mem,
2738 gr_ctx->mem.size, 2738 gr_ctx->mem.size,
2739 NVGPU_MAP_BUFFER_FLAGS_CACHEABLE_FALSE, 2739 0, /* not GPU-cacheable */
2740 gk20a_mem_flag_none, true, 2740 gk20a_mem_flag_none, true,
2741 gr_ctx->mem.aperture); 2741 gr_ctx->mem.aperture);
2742 if (!gr_ctx->mem.gpu_va) 2742 if (!gr_ctx->mem.gpu_va)