mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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 <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1599802 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b42fb7ba26
commit
35ae4194a0
@@ -1052,9 +1052,9 @@ __releases(&l->cde_app->mutex)
|
||||
/* map the destination buffer */
|
||||
get_dma_buf(compbits_scatter_buf); /* a ref for nvgpu_vm_map_linux */
|
||||
err = nvgpu_vm_map_linux(cde_ctx->vm, compbits_scatter_buf, 0,
|
||||
NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE |
|
||||
NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL,
|
||||
NV_KIND_INVALID,
|
||||
NVGPU_VM_MAP_CACHEABLE |
|
||||
NVGPU_VM_MAP_DIRECT_KIND_CTRL,
|
||||
NVGPU_KIND_INVALID,
|
||||
compbits_kind, /* incompressible kind */
|
||||
gk20a_mem_flag_none,
|
||||
map_offset, map_size,
|
||||
@@ -1284,7 +1284,7 @@ static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx)
|
||||
/* map backing store to gpu virtual space */
|
||||
vaddr = nvgpu_gmmu_map(ch->vm, &gr->compbit_store.mem,
|
||||
g->gr.compbit_store.mem.size,
|
||||
NVGPU_AS_MAP_BUFFER_FLAGS_CACHEABLE,
|
||||
NVGPU_VM_MAP_CACHEABLE,
|
||||
gk20a_mem_flag_read_only,
|
||||
false,
|
||||
gr->compbit_store.mem.aperture);
|
||||
|
||||
Reference in New Issue
Block a user