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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c
index 006216c2..9178a0b0 100644
--- a/drivers/gpu/nvgpu/common/linux/vm.c
+++ b/drivers/gpu/nvgpu/common/linux/vm.c
@@ -165,6 +165,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
165 struct nvgpu_sgt *nvgpu_sgt = NULL; 165 struct nvgpu_sgt *nvgpu_sgt = NULL;
166 struct sg_table *sgt; 166 struct sg_table *sgt;
167 struct nvgpu_mapped_buf *mapped_buffer = NULL; 167 struct nvgpu_mapped_buf *mapped_buffer = NULL;
168 struct nvgpu_os_buffer os_buf = { dmabuf, dev };
168 enum nvgpu_aperture aperture; 169 enum nvgpu_aperture aperture;
169 bool va_allocated = false; 170 bool va_allocated = false;
170 bool clear_ctags = false; 171 bool clear_ctags = false;
@@ -277,11 +278,11 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
277 if (!vm->enable_ctag) 278 if (!vm->enable_ctag)
278 binfo.ctag_lines = 0; 279 binfo.ctag_lines = 0;
279 280
280 gk20a_get_comptags(dev, dmabuf, &comptags); 281 gk20a_get_comptags(&os_buf, &comptags);
281 282
282 if (binfo.ctag_lines && !comptags.lines) { 283 if (binfo.ctag_lines && !comptags.lines) {
283 /* allocate compression resources if needed */ 284 /* allocate compression resources if needed */
284 err = gk20a_alloc_comptags(g, dev, dmabuf, 285 err = gk20a_alloc_comptags(g, &os_buf,
285 &g->gr.comp_tags, 286 &g->gr.comp_tags,
286 binfo.ctag_lines); 287 binfo.ctag_lines);
287 if (err) { 288 if (err) {
@@ -296,8 +297,7 @@ int nvgpu_vm_map_linux(struct vm_gk20a *vm,
296 goto clean_up; 297 goto clean_up;
297 } 298 }
298 } else { 299 } else {
299 gk20a_get_comptags(dev, 300 gk20a_get_comptags(&os_buf, &comptags);
300 dmabuf, &comptags);
301 301
302 if (g->ops.ltc.cbc_ctrl) 302 if (g->ops.ltc.cbc_ctrl)
303 g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear, 303 g->ops.ltc.cbc_ctrl(g, gk20a_cbc_op_clear,