From cefabe7eb1f1f1dba9692e21ab4f1b88b9163489 Mon Sep 17 00:00:00 2001 From: Sami Kiminki Date: Thu, 2 Nov 2017 22:03:15 +0200 Subject: gpu: nvgpu: Remove PTE kind logic Since NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL was made mandatory, kernel does not need to know the details about the PTE kinds anymore. Thus, we can remove the kind_gk20a.h header and the code related to kind table setup, as well as simplify buffer mapping code a bit. Bug 1902982 Change-Id: Iaf798023c219a64fb0a84da09431c5ce4bc046eb Signed-off-by: Sami Kiminki Reviewed-on: https://git-master.nvidia.com/r/1560933 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'drivers/gpu/nvgpu/include/nvgpu/linux') diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h index d810f95f..dee8fa09 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h @@ -38,25 +38,13 @@ struct vm_gk20a; struct vm_gk20a_mapping_batch; struct nvgpu_vm_area; +/* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ int nvgpu_vm_map_linux(struct vm_gk20a *vm, struct dma_buf *dmabuf, u64 offset_align, u32 flags, - - /* - * compressible kind if - * NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is - * specified, otherwise just the kind - */ s16 compr_kind, - - /* - * incompressible kind if - * NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is - * specified, otherwise ignored - */ s16 incompr_kind, - int rw_flag, u64 buffer_offset, u64 mapping_size, @@ -66,12 +54,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm, /* * Notes: * - Batch may be NULL if map op is not part of a batch. - * - If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is set, - * compr_kind and incompr_kind work as explained in nvgpu.h. - * - If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is NOT set, - * compr_kind holds the kind and kernel will figure out whether - * it is a compressible or incompressible kind. If compressible, kernel will - * also figure out the incompressible counterpart or return an error. + * - NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ int nvgpu_vm_map_buffer(struct vm_gk20a *vm, int dmabuf_fd, -- cgit v1.2.2