diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/as_gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/as_gk20a.c b/drivers/gpu/nvgpu/gk20a/as_gk20a.c index fa131bb1..3d690e01 100644 --- a/drivers/gpu/nvgpu/gk20a/as_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/as_gk20a.c | |||
@@ -147,7 +147,7 @@ static int gk20a_as_ioctl_map_buffer_ex( | |||
147 | { | 147 | { |
148 | gk20a_dbg_fn(""); | 148 | gk20a_dbg_fn(""); |
149 | 149 | ||
150 | return gk20a_vm_map_buffer(as_share, args->dmabuf_fd, | 150 | return gk20a_vm_map_buffer(as_share->vm, args->dmabuf_fd, |
151 | &args->offset, args->flags, | 151 | &args->offset, args->flags, |
152 | args->kind, | 152 | args->kind, |
153 | args->buffer_offset, | 153 | args->buffer_offset, |
@@ -160,7 +160,7 @@ static int gk20a_as_ioctl_map_buffer( | |||
160 | struct nvgpu_as_map_buffer_args *args) | 160 | struct nvgpu_as_map_buffer_args *args) |
161 | { | 161 | { |
162 | gk20a_dbg_fn(""); | 162 | gk20a_dbg_fn(""); |
163 | return gk20a_vm_map_buffer(as_share, args->dmabuf_fd, | 163 | return gk20a_vm_map_buffer(as_share->vm, args->dmabuf_fd, |
164 | &args->o_a.offset, | 164 | &args->o_a.offset, |
165 | args->flags, NV_KIND_DEFAULT, | 165 | args->flags, NV_KIND_DEFAULT, |
166 | 0, 0); | 166 | 0, 0); |
@@ -172,7 +172,7 @@ static int gk20a_as_ioctl_unmap_buffer( | |||
172 | struct nvgpu_as_unmap_buffer_args *args) | 172 | struct nvgpu_as_unmap_buffer_args *args) |
173 | { | 173 | { |
174 | gk20a_dbg_fn(""); | 174 | gk20a_dbg_fn(""); |
175 | return gk20a_vm_unmap_buffer(as_share, args->offset); | 175 | return gk20a_vm_unmap_buffer(as_share->vm, args->offset); |
176 | } | 176 | } |
177 | 177 | ||
178 | static int gk20a_as_ioctl_get_va_regions( | 178 | static int gk20a_as_ioctl_get_va_regions( |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index cfd44cc3..2874567c 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -2612,7 +2612,7 @@ static int gk20a_dmabuf_get_kind(struct dma_buf *dmabuf) | |||
2612 | return kind; | 2612 | return kind; |
2613 | } | 2613 | } |
2614 | 2614 | ||
2615 | int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, | 2615 | int gk20a_vm_map_buffer(struct vm_gk20a *vm, |
2616 | int dmabuf_fd, | 2616 | int dmabuf_fd, |
2617 | u64 *offset_align, | 2617 | u64 *offset_align, |
2618 | u32 flags, /*NVGPU_AS_MAP_BUFFER_FLAGS_*/ | 2618 | u32 flags, /*NVGPU_AS_MAP_BUFFER_FLAGS_*/ |
@@ -2621,7 +2621,6 @@ int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, | |||
2621 | u64 mapping_size) | 2621 | u64 mapping_size) |
2622 | { | 2622 | { |
2623 | int err = 0; | 2623 | int err = 0; |
2624 | struct vm_gk20a *vm = as_share->vm; | ||
2625 | struct dma_buf *dmabuf; | 2624 | struct dma_buf *dmabuf; |
2626 | u64 ret_va; | 2625 | u64 ret_va; |
2627 | 2626 | ||
@@ -2656,10 +2655,8 @@ int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, | |||
2656 | return err; | 2655 | return err; |
2657 | } | 2656 | } |
2658 | 2657 | ||
2659 | int gk20a_vm_unmap_buffer(struct gk20a_as_share *as_share, u64 offset) | 2658 | int gk20a_vm_unmap_buffer(struct vm_gk20a *vm, u64 offset) |
2660 | { | 2659 | { |
2661 | struct vm_gk20a *vm = as_share->vm; | ||
2662 | |||
2663 | gk20a_dbg_fn(""); | 2660 | gk20a_dbg_fn(""); |
2664 | 2661 | ||
2665 | gk20a_vm_unmap_user(vm, offset); | 2662 | gk20a_vm_unmap_user(vm, offset); |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index e4fc3085..596661ca 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -532,7 +532,7 @@ int gk20a_vm_free_space(struct gk20a_as_share *as_share, | |||
532 | struct nvgpu_as_free_space_args *args); | 532 | struct nvgpu_as_free_space_args *args); |
533 | int gk20a_vm_bind_channel(struct gk20a_as_share *as_share, | 533 | int gk20a_vm_bind_channel(struct gk20a_as_share *as_share, |
534 | struct channel_gk20a *ch); | 534 | struct channel_gk20a *ch); |
535 | int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, | 535 | int gk20a_vm_map_buffer(struct vm_gk20a *vm, |
536 | int dmabuf_fd, | 536 | int dmabuf_fd, |
537 | u64 *offset_align, | 537 | u64 *offset_align, |
538 | u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */ | 538 | u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */ |
@@ -548,7 +548,7 @@ int gk20a_init_vm(struct mm_gk20a *mm, | |||
548 | bool big_pages, | 548 | bool big_pages, |
549 | char *name); | 549 | char *name); |
550 | void gk20a_deinit_vm(struct vm_gk20a *vm); | 550 | void gk20a_deinit_vm(struct vm_gk20a *vm); |
551 | int gk20a_vm_unmap_buffer(struct gk20a_as_share *, u64 offset); | 551 | int gk20a_vm_unmap_buffer(struct vm_gk20a *vm, u64 offset); |
552 | void gk20a_get_comptags(struct device *dev, struct dma_buf *dmabuf, | 552 | void gk20a_get_comptags(struct device *dev, struct dma_buf *dmabuf, |
553 | struct gk20a_comptags *comptags); | 553 | struct gk20a_comptags *comptags); |
554 | dma_addr_t gk20a_mm_gpuva_to_iova_base(struct vm_gk20a *vm, u64 gpu_vaddr); | 554 | dma_addr_t gk20a_mm_gpuva_to_iova_base(struct vm_gk20a *vm, u64 gpu_vaddr); |