From bb457e675ed2c5dde45e2e89e3e472833444d3f9 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 29 Aug 2017 13:00:22 -0700 Subject: gpu: nvgpu: Remove mapping of comptags to user VA Remove the kernel feature to map compbit backing store areas to GPU VA. The feature is not used, and the relevant user space code is getting removed, too. Change-Id: I94f8bb9145da872694fdc5d3eb3c1365b2f47945 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1547898 Reviewed-by: Deepak Nibade Reviewed-by: Sami Kiminki Reviewed-by: Alex Waterman Reviewed-by: Automatic_Commit_Validation_User --- drivers/gpu/nvgpu/common/linux/ioctl_as.c | 33 ------------------------------- drivers/gpu/nvgpu/common/linux/vm.c | 12 +---------- drivers/gpu/nvgpu/common/linux/vm_priv.h | 10 +--------- 3 files changed, 2 insertions(+), 53 deletions(-) (limited to 'drivers/gpu/nvgpu/common') 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( return 0; } -static int gk20a_as_ioctl_get_buffer_compbits_info( - struct gk20a_as_share *as_share, - struct nvgpu_as_get_buffer_compbits_info_args *args) -{ - gk20a_dbg_fn(""); - return nvgpu_vm_get_compbits_info(as_share->vm, - args->mapping_gva, - &args->compbits_win_size, - &args->compbits_win_ctagline, - &args->mapping_ctagline, - &args->flags); -} - -static int gk20a_as_ioctl_map_buffer_compbits( - struct gk20a_as_share *as_share, - struct nvgpu_as_map_buffer_compbits_args *args) -{ - gk20a_dbg_fn(""); - return nvgpu_vm_map_compbits(as_share->vm, - args->mapping_gva, - &args->compbits_win_gva, - &args->mapping_iova, - args->flags); -} - int gk20a_as_dev_open(struct inode *inode, struct file *filp) { struct nvgpu_os_linux *l; @@ -364,14 +339,6 @@ long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) err = gk20a_as_ioctl_get_va_regions(as_share, (struct nvgpu_as_get_va_regions_args *)buf); break; - case NVGPU_AS_IOCTL_GET_BUFFER_COMPBITS_INFO: - err = gk20a_as_ioctl_get_buffer_compbits_info(as_share, - (struct nvgpu_as_get_buffer_compbits_info_args *)buf); - break; - case NVGPU_AS_IOCTL_MAP_BUFFER_COMPBITS: - err = gk20a_as_ioctl_map_buffer_compbits(as_share, - (struct nvgpu_as_map_buffer_compbits_args *)buf); - break; case NVGPU_AS_IOCTL_MAP_BUFFER_BATCH: err = gk20a_as_ioctl_map_buffer_batch(as_share, (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, struct gk20a_comptags comptags; bool clear_ctags = false; struct scatterlist *sgl; - u64 ctag_map_win_size = 0; - u32 ctag_map_win_ctagline = 0; struct nvgpu_vm_area *vm_area = NULL; u32 ctag_offset; enum nvgpu_aperture aperture; @@ -298,15 +296,10 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, g->ops.fb.compression_page_size(g)); if (bfr.ctag_lines && !comptags.lines) { - const bool user_mappable = - !!(flags & NVGPU_AS_MAP_BUFFER_FLAGS_MAPPABLE_COMPBITS); - /* allocate compression resources if needed */ err = gk20a_alloc_comptags(g, dev, dmabuf, ctag_allocator, - bfr.ctag_lines, user_mappable, - &ctag_map_win_size, - &ctag_map_win_ctagline); + bfr.ctag_lines); if (err) { /* ok to fall back here if we ran out */ /* TBD: we can partially alloc ctags as well... */ @@ -370,9 +363,6 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, mapped_buffer->ctag_offset = bfr.ctag_offset; mapped_buffer->ctag_lines = bfr.ctag_lines; mapped_buffer->ctag_allocated_lines = bfr.ctag_allocated_lines; - mapped_buffer->ctags_mappable = bfr.ctag_user_mappable; - mapped_buffer->ctag_map_win_size = ctag_map_win_size; - mapped_buffer->ctag_map_win_ctagline = ctag_map_win_ctagline; mapped_buffer->vm = vm; mapped_buffer->flags = flags; 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, u64 mapping_size, struct vm_gk20a_mapping_batch *mapping_batch); -int nvgpu_vm_map_compbits(struct vm_gk20a *vm, - u64 mapping_gva, - u64 *compbits_win_gva, - u64 *mapping_iova, - u32 flags); - /* Note: batch may be NULL if map op is not part of a batch */ int nvgpu_vm_map_buffer(struct vm_gk20a *vm, int dmabuf_fd, @@ -86,8 +80,6 @@ int gk20a_alloc_comptags(struct gk20a *g, struct device *dev, struct dma_buf *dmabuf, struct gk20a_comptag_allocator *allocator, - u32 lines, bool user_mappable, - u64 *ctag_map_win_size, - u32 *ctag_map_win_ctagline); + u32 lines); #endif -- cgit v1.2.2