diff options
author | Laura Abbott <lauraa@codeaurora.org> | 2012-03-16 15:33:39 -0700 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-07-23 14:18:18 +0530 |
commit | 43cca25b44068e540255fe2da2ae21fe3c6dafb9 (patch) | |
tree | eacf8e3530b86eca77f3414f2a2dfb0b551e3bb7 /drivers/gpu | |
parent | 91e6ef3f5718498331b03bf73d73504fd7ef2397 (diff) |
gpu: ion: Map only the vma size given
When mapping carveout buffers into userspace, only map
the size of the vma given, not the full size of the buffer
since clients may map less than the buffer size.
Change-Id: I1b391b23219455e879a900d947c728db3c8c4a76
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/ion/ion_carveout_heap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/ion/ion_carveout_heap.c b/drivers/gpu/ion/ion_carveout_heap.c index b4fcb3c92479..47690c2e0880 100644 --- a/drivers/gpu/ion/ion_carveout_heap.c +++ b/drivers/gpu/ion/ion_carveout_heap.c @@ -116,7 +116,7 @@ int ion_carveout_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, { return remap_pfn_range(vma, vma->vm_start, __phys_to_pfn(buffer->priv_phys) + vma->vm_pgoff, - buffer->size, + vma->vm_end - vma->vm_start, pgprot_noncached(vma->vm_page_prot)); } |