summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/linux/vm.h21
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vm.h12
2 files changed, 6 insertions, 27 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,
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h
index 801fb8ed..10a7f7ce 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vm.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h
@@ -127,10 +127,8 @@ struct nvgpu_ctag_buffer_info {
127 enum gmmu_pgsz_gk20a pgsz_idx; 127 enum gmmu_pgsz_gk20a pgsz_idx;
128 u32 flags; 128 u32 flags;
129 129
130 u8 kind_v; 130 s16 compr_kind;
131 u8 uc_kind_v; 131 s16 incompr_kind;
132 bool use_kind_v;
133 bool use_uc_kind_v;
134 132
135 u32 ctag_lines; 133 u32 ctag_lines;
136}; 134};
@@ -202,10 +200,8 @@ void nvgpu_vm_put(struct vm_gk20a *vm);
202int vm_aspace_id(struct vm_gk20a *vm); 200int vm_aspace_id(struct vm_gk20a *vm);
203int nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size); 201int nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size);
204 202
205int nvgpu_vm_init_kind_info(struct nvgpu_ctag_buffer_info *binfo, 203int nvgpu_vm_compute_compression(struct vm_gk20a *vm,
206 s16 compr_kind, s16 incompr_kind); 204 struct nvgpu_ctag_buffer_info *binfo);
207int nvgpu_vm_compute_kind_and_compression(struct vm_gk20a *vm,
208 struct nvgpu_ctag_buffer_info *binfo);
209 205
210/* batching eliminates redundant cache flushes and invalidates */ 206/* batching eliminates redundant cache flushes and invalidates */
211void nvgpu_vm_mapping_batch_start(struct vm_gk20a_mapping_batch *batch); 207void nvgpu_vm_mapping_batch_start(struct vm_gk20a_mapping_batch *batch);