summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-04-16 14:14:52 +0200
committerChanho Park <chanho61.park@samsung.com>2014-11-21 19:12:26 +0900
commite45a3cfd5cee62fa0821f9caeb2a1dd735a16482 (patch)
treeaa85fba0eaae1ff1633bec516094d94d4a1640fd /include
parent1ade17514b82c7c7d419f77f2ff4ea8336c5c602 (diff)
downloadlinux-3.10-e45a3cfd5cee62fa0821f9caeb2a1dd735a16482.tar.gz
linux-3.10-e45a3cfd5cee62fa0821f9caeb2a1dd735a16482.tar.bz2
linux-3.10-e45a3cfd5cee62fa0821f9caeb2a1dd735a16482.zip
drm/gem: Split drm_gem_mmap() into object search and object mapping
The drm_gem_mmap() function first finds the GEM object to be mapped based on the fake mmap offset and then maps the object. Split the object mapping code into a standalone drm_gem_mmap_obj() function that can be used to implement dma-buf mmap() operations. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 225a5ebd176..4892a837803 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1675,6 +1675,8 @@ int drm_gem_private_object_init(struct drm_device *dev,
void drm_gem_object_handle_free(struct drm_gem_object *obj);
void drm_gem_vm_open(struct vm_area_struct *vma);
void drm_gem_vm_close(struct vm_area_struct *vma);
+int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
+ struct vm_area_struct *vma);
int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
#include <drm/drm_global.h>