diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2015-01-20 06:34:04 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:04:48 -0400 |
commit | 5b6e8995b2a3d399a8cc7fd249301122053666e1 (patch) | |
tree | c38041a22da5260b54f4fc81c53f0038f42a6f75 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |
parent | 8991080a99ec5a166e11068fddbc8420079f6000 (diff) |
gpu: nvgpu: use vm param to vm_map/unmap_buffer
Pass vm instead of as share to the userspace buffer mapping functions,
since they need to be called also from other places than just the AS
device ioctls, and as share is specific to them.
Bug 1573150
Change-Id: I994872f23ea7b1582361f3f4fabbd64b4786419c
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/674020
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); |