summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vm.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c
index c84f531d..0ace5abe 100644
--- a/drivers/gpu/nvgpu/common/linux/vm.c
+++ b/drivers/gpu/nvgpu/common/linux/vm.c
@@ -199,8 +199,6 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm,
199 struct gk20a_comptags comptags; 199 struct gk20a_comptags comptags;
200 bool clear_ctags = false; 200 bool clear_ctags = false;
201 struct scatterlist *sgl; 201 struct scatterlist *sgl;
202 u64 ctag_map_win_size = 0;
203 u32 ctag_map_win_ctagline = 0;
204 struct nvgpu_vm_area *vm_area = NULL; 202 struct nvgpu_vm_area *vm_area = NULL;
205 u32 ctag_offset; 203 u32 ctag_offset;
206 enum nvgpu_aperture aperture; 204 enum nvgpu_aperture aperture;
@@ -298,15 +296,10 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm,
298 g->ops.fb.compression_page_size(g)); 296 g->ops.fb.compression_page_size(g));
299 297
300 if (bfr.ctag_lines && !comptags.lines) { 298 if (bfr.ctag_lines && !comptags.lines) {
301 const bool user_mappable =
302 !!(flags & NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS);
303
304 /* allocate compression resources if needed */ 299 /* allocate compression resources if needed */
305 err = gk20a_alloc_comptags(g, dev, dmabuf, 300 err = gk20a_alloc_comptags(g, dev, dmabuf,
306 ctag_allocator, 301 ctag_allocator,
307 bfr.ctag_lines, user_mappable, 302 bfr.ctag_lines);
308 &ctag_map_win_size,
309 &ctag_map_win_ctagline);
310 if (err) { 303 if (err) {
311 /* ok to fall back here if we ran out */ 304 /* ok to fall back here if we ran out */
312 /* TBD: we can partially alloc ctags as well... */ 305 /* TBD: we can partially alloc ctags as well... */
@@ -370,9 +363,6 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm,
370 mapped_buffer->ctag_offset = bfr.ctag_offset; 363 mapped_buffer->ctag_offset = bfr.ctag_offset;
371 mapped_buffer->ctag_lines = bfr.ctag_lines; 364 mapped_buffer->ctag_lines = bfr.ctag_lines;
372 mapped_buffer->ctag_allocated_lines = bfr.ctag_allocated_lines; 365 mapped_buffer->ctag_allocated_lines = bfr.ctag_allocated_lines;
373 mapped_buffer->ctags_mappable = bfr.ctag_user_mappable;
374 mapped_buffer->ctag_map_win_size = ctag_map_win_size;
375 mapped_buffer->ctag_map_win_ctagline = ctag_map_win_ctagline;
376 mapped_buffer->vm = vm; 366 mapped_buffer->vm = vm;
377 mapped_buffer->flags = flags; 367 mapped_buffer->flags = flags;
378 mapped_buffer->kind = kind; 368 mapped_buffer->kind = kind;