diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_as.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_as.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index e566bfb4..8a5318e4 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c | |||
@@ -88,8 +88,8 @@ static int gk20a_as_ioctl_map_buffer_ex( | |||
88 | compressible_kind = args->compr_kind; | 88 | compressible_kind = args->compr_kind; |
89 | incompressible_kind = args->incompr_kind; | 89 | incompressible_kind = args->incompr_kind; |
90 | } else { | 90 | } else { |
91 | compressible_kind = args->kind; | 91 | /* unsupported, direct kind control must be used */ |
92 | incompressible_kind = NV_KIND_INVALID; | 92 | return -EINVAL; |
93 | } | 93 | } |
94 | 94 | ||
95 | return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd, | 95 | return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd, |
@@ -100,19 +100,6 @@ static int gk20a_as_ioctl_map_buffer_ex( | |||
100 | NULL); | 100 | NULL); |
101 | } | 101 | } |
102 | 102 | ||
103 | static int gk20a_as_ioctl_map_buffer( | ||
104 | struct gk20a_as_share *as_share, | ||
105 | struct nvgpu_as_map_buffer_args *args) | ||
106 | { | ||
107 | gk20a_dbg_fn(""); | ||
108 | return nvgpu_vm_map_buffer(as_share->vm, args->dmabuf_fd, | ||
109 | &args->o_a.offset, | ||
110 | args->flags, NV_KIND_DEFAULT, | ||
111 | NV_KIND_DEFAULT, | ||
112 | 0, 0, NULL); | ||
113 | /* args->o_a.offset will be set if !err */ | ||
114 | } | ||
115 | |||
116 | static int gk20a_as_ioctl_unmap_buffer( | 103 | static int gk20a_as_ioctl_unmap_buffer( |
117 | struct gk20a_as_share *as_share, | 104 | struct gk20a_as_share *as_share, |
118 | struct nvgpu_as_unmap_buffer_args *args) | 105 | struct nvgpu_as_unmap_buffer_args *args) |
@@ -187,8 +174,9 @@ static int gk20a_as_ioctl_map_buffer_batch( | |||
187 | compressible_kind = map_args.compr_kind; | 174 | compressible_kind = map_args.compr_kind; |
188 | incompressible_kind = map_args.incompr_kind; | 175 | incompressible_kind = map_args.incompr_kind; |
189 | } else { | 176 | } else { |
190 | compressible_kind = map_args.kind; | 177 | /* direct kind control must be used */ |
191 | incompressible_kind = NV_KIND_INVALID; | 178 | err = -EINVAL; |
179 | break; | ||
192 | } | 180 | } |
193 | 181 | ||
194 | err = nvgpu_vm_map_buffer( | 182 | err = nvgpu_vm_map_buffer( |
@@ -348,11 +336,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
348 | err = gk20a_as_ioctl_free_space(as_share, | 336 | err = gk20a_as_ioctl_free_space(as_share, |
349 | (struct nvgpu_as_free_space_args *)buf); | 337 | (struct nvgpu_as_free_space_args *)buf); |
350 | break; | 338 | break; |
351 | case NVGPU_AS_IOCTL_MAP_BUFFER: | ||
352 | trace_gk20a_as_ioctl_map_buffer(g->name); | ||
353 | err = gk20a_as_ioctl_map_buffer(as_share, | ||
354 | (struct nvgpu_as_map_buffer_args *)buf); | ||
355 | break; | ||
356 | case NVGPU_AS_IOCTL_MAP_BUFFER_EX: | 339 | case NVGPU_AS_IOCTL_MAP_BUFFER_EX: |
357 | trace_gk20a_as_ioctl_map_buffer(g->name); | 340 | trace_gk20a_as_ioctl_map_buffer(g->name); |
358 | err = gk20a_as_ioctl_map_buffer_ex(as_share, | 341 | err = gk20a_as_ioctl_map_buffer_ex(as_share, |