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/comptags.h10
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vm.h17
2 files changed, 8 insertions, 19 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/comptags.h b/drivers/gpu/nvgpu/include/nvgpu/comptags.h
index 5482d0ce..2d9f034a 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/comptags.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/comptags.h
@@ -25,8 +25,14 @@ struct nvgpu_os_buffer;
25struct gk20a_comptags { 25struct gk20a_comptags {
26 u32 offset; 26 u32 offset;
27 u32 lines; 27 u32 lines;
28 u32 allocated_lines; 28
29 bool user_mappable; 29 /*
30 * This signals whether allocation has been attempted. Observe
31 * 'lines' to see whether comptags were actually allocated. We
32 * try alloc only once per buffer in order not to break
33 * multiple compressible-kind mappings.
34 */
35 bool allocated;
30}; 36};
31 37
32struct gk20a_comptag_allocator { 38struct gk20a_comptag_allocator {
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h
index abb297ab..c0a4124c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/vm.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h
@@ -110,9 +110,6 @@ struct nvgpu_mapped_buf {
110 u64 size; 110 u64 size;
111 111
112 u32 pgsz_idx; 112 u32 pgsz_idx;
113 u32 ctag_offset;
114 u32 ctag_lines;
115 u32 ctag_allocated_lines;
116 113
117 u32 flags; 114 u32 flags;
118 u32 kind; 115 u32 kind;
@@ -143,17 +140,6 @@ mapped_buffer_from_rbtree_node(struct nvgpu_rbtree_node *node)
143 ((uintptr_t)node - offsetof(struct nvgpu_mapped_buf, node)); 140 ((uintptr_t)node - offsetof(struct nvgpu_mapped_buf, node));
144} 141}
145 142
146struct nvgpu_ctag_buffer_info {
147 u64 size;
148 enum gmmu_pgsz_gk20a pgsz_idx;
149 u32 flags;
150
151 s16 compr_kind;
152 s16 incompr_kind;
153
154 u32 ctag_lines;
155};
156
157struct vm_gk20a { 143struct vm_gk20a {
158 struct mm_gk20a *mm; 144 struct mm_gk20a *mm;
159 struct gk20a_as_share *as_share; /* as_share this represents */ 145 struct gk20a_as_share *as_share; /* as_share this represents */
@@ -221,9 +207,6 @@ void nvgpu_vm_put(struct vm_gk20a *vm);
221int vm_aspace_id(struct vm_gk20a *vm); 207int vm_aspace_id(struct vm_gk20a *vm);
222int nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size); 208int nvgpu_big_pages_possible(struct vm_gk20a *vm, u64 base, u64 size);
223 209
224int nvgpu_vm_compute_compression(struct vm_gk20a *vm,
225 struct nvgpu_ctag_buffer_info *binfo);
226
227/* batching eliminates redundant cache flushes and invalidates */ 210/* batching eliminates redundant cache flushes and invalidates */
228void nvgpu_vm_mapping_batch_start(struct vm_gk20a_mapping_batch *batch); 211void nvgpu_vm_mapping_batch_start(struct vm_gk20a_mapping_batch *batch);
229void nvgpu_vm_mapping_batch_finish( 212void nvgpu_vm_mapping_batch_finish(