diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_as.c | 33 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vm.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vm_priv.h | 10 |
3 files changed, 2 insertions, 53 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index 273024bd..6fd0a3d2 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c | |||
@@ -227,31 +227,6 @@ static int gk20a_as_ioctl_get_va_regions( | |||
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | 229 | ||
230 | static int gk20a_as_ioctl_get_buffer_compbits_info( | ||
231 | struct gk20a_as_share *as_share, | ||
232 | struct nvgpu_as_get_buffer_compbits_info_args *args) | ||
233 | { | ||
234 | gk20a_dbg_fn(""); | ||
235 | return nvgpu_vm_get_compbits_info(as_share->vm, | ||
236 | args->mapping_gva, | ||
237 | &args->compbits_win_size, | ||
238 | &args->compbits_win_ctagline, | ||
239 | &args->mapping_ctagline, | ||
240 | &args->flags); | ||
241 | } | ||
242 | |||
243 | static int gk20a_as_ioctl_map_buffer_compbits( | ||
244 | struct gk20a_as_share *as_share, | ||
245 | struct nvgpu_as_map_buffer_compbits_args *args) | ||
246 | { | ||
247 | gk20a_dbg_fn(""); | ||
248 | return nvgpu_vm_map_compbits(as_share->vm, | ||
249 | args->mapping_gva, | ||
250 | &args->compbits_win_gva, | ||
251 | &args->mapping_iova, | ||
252 | args->flags); | ||
253 | } | ||
254 | |||
255 | int gk20a_as_dev_open(struct inode *inode, struct file *filp) | 230 | int gk20a_as_dev_open(struct inode *inode, struct file *filp) |
256 | { | 231 | { |
257 | struct nvgpu_os_linux *l; | 232 | struct nvgpu_os_linux *l; |
@@ -364,14 +339,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
364 | err = gk20a_as_ioctl_get_va_regions(as_share, | 339 | err = gk20a_as_ioctl_get_va_regions(as_share, |
365 | (struct nvgpu_as_get_va_regions_args *)buf); | 340 | (struct nvgpu_as_get_va_regions_args *)buf); |
366 | break; | 341 | break; |
367 | case NVGPU_AS_IOCTL_GET_BUFFER_COMPBITS_INFO: | ||
368 | err = gk20a_as_ioctl_get_buffer_compbits_info(as_share, | ||
369 | (struct nvgpu_as_get_buffer_compbits_info_args *)buf); | ||
370 | break; | ||
371 | case NVGPU_AS_IOCTL_MAP_BUFFER_COMPBITS: | ||
372 | err = gk20a_as_ioctl_map_buffer_compbits(as_share, | ||
373 | (struct nvgpu_as_map_buffer_compbits_args *)buf); | ||
374 | break; | ||
375 | case NVGPU_AS_IOCTL_MAP_BUFFER_BATCH: | 342 | case NVGPU_AS_IOCTL_MAP_BUFFER_BATCH: |
376 | err = gk20a_as_ioctl_map_buffer_batch(as_share, | 343 | err = gk20a_as_ioctl_map_buffer_batch(as_share, |
377 | (struct nvgpu_as_map_buffer_batch_args *)buf); | 344 | (struct nvgpu_as_map_buffer_batch_args *)buf); |
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; |
diff --git a/drivers/gpu/nvgpu/common/linux/vm_priv.h b/drivers/gpu/nvgpu/common/linux/vm_priv.h index 14852264..4f6b10bb 100644 --- a/drivers/gpu/nvgpu/common/linux/vm_priv.h +++ b/drivers/gpu/nvgpu/common/linux/vm_priv.h | |||
@@ -49,12 +49,6 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
49 | u64 mapping_size, | 49 | u64 mapping_size, |
50 | struct vm_gk20a_mapping_batch *mapping_batch); | 50 | struct vm_gk20a_mapping_batch *mapping_batch); |
51 | 51 | ||
52 | int nvgpu_vm_map_compbits(struct vm_gk20a *vm, | ||
53 | u64 mapping_gva, | ||
54 | u64 *compbits_win_gva, | ||
55 | u64 *mapping_iova, | ||
56 | u32 flags); | ||
57 | |||
58 | /* Note: batch may be NULL if map op is not part of a batch */ | 52 | /* Note: batch may be NULL if map op is not part of a batch */ |
59 | int nvgpu_vm_map_buffer(struct vm_gk20a *vm, | 53 | int nvgpu_vm_map_buffer(struct vm_gk20a *vm, |
60 | int dmabuf_fd, | 54 | int dmabuf_fd, |
@@ -86,8 +80,6 @@ int gk20a_alloc_comptags(struct gk20a *g, | |||
86 | struct device *dev, | 80 | struct device *dev, |
87 | struct dma_buf *dmabuf, | 81 | struct dma_buf *dmabuf, |
88 | struct gk20a_comptag_allocator *allocator, | 82 | struct gk20a_comptag_allocator *allocator, |
89 | u32 lines, bool user_mappable, | 83 | u32 lines); |
90 | u64 *ctag_map_win_size, | ||
91 | u32 *ctag_map_win_ctagline); | ||
92 | 84 | ||
93 | #endif | 85 | #endif |