summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/linux
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2017-11-02 16:03:15 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-10 11:38:19 -0500
commitcefabe7eb1f1f1dba9692e21ab4f1b88b9163489 (patch)
treeb0f4e6ce64cd408e780925b8b3365b45805b7d95 /drivers/gpu/nvgpu/include/nvgpu/linux
parentb584bf8aa814d026498ebcee23480d1963338e47 (diff)
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 <skiminki@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560933 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/linux')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/linux/vm.h21
1 files changed, 2 insertions, 19 deletions
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;
38struct vm_gk20a_mapping_batch; 38struct vm_gk20a_mapping_batch;
39struct nvgpu_vm_area; 39struct nvgpu_vm_area;
40 40
41/* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */
41int nvgpu_vm_map_linux(struct vm_gk20a *vm, 42int nvgpu_vm_map_linux(struct vm_gk20a *vm,
42 struct dma_buf *dmabuf, 43 struct dma_buf *dmabuf,
43 u64 offset_align, 44 u64 offset_align,
44 u32 flags, 45 u32 flags,
45
46 /*
47 * compressible kind if
48 * NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is
49 * specified, otherwise just the kind
50 */
51 s16 compr_kind, 46 s16 compr_kind,
52
53 /*
54 * incompressible kind if
55 * NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is
56 * specified, otherwise ignored
57 */
58 s16 incompr_kind, 47 s16 incompr_kind,
59
60 int rw_flag, 48 int rw_flag,
61 u64 buffer_offset, 49 u64 buffer_offset,
62 u64 mapping_size, 50 u64 mapping_size,
@@ -66,12 +54,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
66/* 54/*
67 * Notes: 55 * Notes:
68 * - Batch may be NULL if map op is not part of a batch. 56 * - Batch may be NULL if map op is not part of a batch.
69 * - If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is set, 57 * - NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set
70 * compr_kind and incompr_kind work as explained in nvgpu.h.
71 * - If NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL is NOT set,
72 * compr_kind holds the kind and kernel will figure out whether
73 * it is a compressible or incompressible kind. If compressible, kernel will
74 * also figure out the incompressible counterpart or return an error.
75 */ 58 */
76int nvgpu_vm_map_buffer(struct vm_gk20a *vm, 59int nvgpu_vm_map_buffer(struct vm_gk20a *vm,
77 int dmabuf_fd, 60 int dmabuf_fd,