From 35ae4194a05d47aa6d79353428f81f2ca47ce90f Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 16 Nov 2017 12:56:53 -0800 Subject: gpu: nvgpu: Add translation for NVGPU MM flags Add a translation layer to convert from the NVGPU_AS_* flags to to new set of NVGPU_VM_MAP_* and NVGPU_VM_AREA_ALLOC_* flags. This allows the common MM code to not depend on the UAPI header defined for Linux. In addition to this change a couple of other small changes were made: 1. Deprecate, print a warning, and ignore usage of the NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS flag. 2. Move the t19x IO coherence flag from the t19x UAPI header to the regular UAPI header. JIRA NVGPU-293 Change-Id: I146402b0e8617294374e63e78f8826c57cd3b291 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1599802 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index fc008169..03e1d567 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -1728,7 +1728,7 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g, pm_ctx->mem.gpu_va = nvgpu_gmmu_map(c->vm, &pm_ctx->mem, pm_ctx->mem.size, - NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE, + NVGPU_VM_MAP_CACHEABLE, gk20a_mem_flag_none, true, pm_ctx->mem.aperture); if (!pm_ctx->mem.gpu_va) { @@ -2623,7 +2623,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g, } gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, - NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE, + NVGPU_VM_MAP_CACHEABLE, gk20a_mem_flag_none, true, mem->aperture); if (!gpu_va) goto clean_up; @@ -2641,7 +2641,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g, } gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, - NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE, + NVGPU_VM_MAP_CACHEABLE, gk20a_mem_flag_none, false, mem->aperture); if (!gpu_va) goto clean_up; @@ -2659,7 +2659,7 @@ static int gr_gk20a_map_global_ctx_buffers(struct gk20a *g, } gpu_va = nvgpu_gmmu_map(ch_vm, mem, mem->size, - NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE, + NVGPU_VM_MAP_CACHEABLE, gk20a_mem_flag_none, true, mem->aperture); if (!gpu_va) goto clean_up; -- cgit v1.2.2