From 5b6e8995b2a3d399a8cc7fd249301122053666e1 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Tue, 20 Jan 2015 13:34:04 +0200 Subject: 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 Reviewed-on: http://git-master/r/674020 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') 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) return kind; } -int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, +int gk20a_vm_map_buffer(struct vm_gk20a *vm, int dmabuf_fd, u64 *offset_align, u32 flags, /*NVGPU_AS_MAP_BUFFER_FLAGS_*/ @@ -2621,7 +2621,6 @@ int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, u64 mapping_size) { int err = 0; - struct vm_gk20a *vm = as_share->vm; struct dma_buf *dmabuf; u64 ret_va; @@ -2656,10 +2655,8 @@ int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, return err; } -int gk20a_vm_unmap_buffer(struct gk20a_as_share *as_share, u64 offset) +int gk20a_vm_unmap_buffer(struct vm_gk20a *vm, u64 offset) { - struct vm_gk20a *vm = as_share->vm; - gk20a_dbg_fn(""); gk20a_vm_unmap_user(vm, offset); -- cgit v1.2.2