other versions
- wheezy-backports 3.16.39-1+deb8u1~bpo70+1
- jessie 3.16.43-2
DRM_GEM_MMAP_OBJ(9) | DRM Core | DRM_GEM_MMAP_OBJ(9) |
NAME¶
drm_gem_mmap_obj - memory map a GEM objectSYNOPSIS¶
int
drm_gem_mmap_obj(struct drm_gem_object * obj,
unsigned long obj_size,
struct vm_area_struct * vma);
ARGUMENTS¶
objthe GEM object to map
obj_size
the object size to be mapped, in bytes
vma
VMA for the area to be mapped
DESCRIPTION¶
Set up the VMA to prepare mapping of the GEM object using the gem_vm_ops provided by the driver. Depending on their requirements, drivers can either provide a fault handler in their gem_vm_ops (in which case any accesses to the object will be trapped, to perform migration, GTT binding, surface register allocation, or performance monitoring), or mmap the buffer memory synchronously after calling drm_gem_mmap_obj. This function is mainly intended to implement the DMABUF mmap operation, when the GEM object is not looked up based on its fake offset. To implement the DRM mmap operation, drivers should use the drm_gem_mmap function.NOTE¶
This function has to be protected with dev->struct_mutex Return 0 or success or -EINVAL if the object size is smaller than the VMA size, or if no gem_vm_ops are provided.AUTHORS¶
Jesse Barnes <jesse.barnes@intel.com>Initial version
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Driver internals
Daniel Vetter <daniel.vetter@ffwll.ch>
Contributions all over the place
COPYRIGHT¶
February 2017 | Kernel Hackers Manual 3.16 |