summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_as.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_as.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_as.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
index 8a5318e4..f23dc53c 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
@@ -79,22 +79,19 @@ static int gk20a_as_ioctl_map_buffer_ex(
79 struct gk20a_as_share *as_share, 79 struct gk20a_as_share *as_share,
80 struct nvgpu_as_map_buffer_ex_args *args) 80 struct nvgpu_as_map_buffer_ex_args *args)
81{ 81{
82 s16 compressible_kind;
83 s16 incompressible_kind;
84
85 gk20a_dbg_fn(""); 82 gk20a_dbg_fn("");
86 83
87 if (args->flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL) { 84 /* unsupported, direct kind control must be used */
88 compressible_kind = args->compr_kind; 85 if (!(args->flags & NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL)) {
89 incompressible_kind = args->incompr_kind; 86 struct gk20a *g = as_share->vm->mm->g;
90 } else { 87 nvgpu_log_info(g, "Direct kind control must be requested");
91 /* unsupported, direct kind control must be used */
92 return -EINVAL; 88 return -EINVAL;
93 } 89 }
94 90
95 return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd, 91 return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd,
96 &args->offset, args->flags, 92 &args->offset, args->flags,
97 compressible_kind, incompressible_kind, 93 args->compr_kind,
94 args->incompr_kind,
98 args->buffer_offset, 95 args->buffer_offset,
99 args->mapping_size, 96 args->mapping_size,
100 NULL); 97 NULL);