'\" t .\" Title: drm_gem_mmap .\" Author: .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: DRM Core .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "DRM_GEM_MMAP" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "DRM Core" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" drm_gem_mmap \- memory map routine for GEM objects .SH "SYNOPSIS" .HP \w'int\ drm_gem_mmap('u .BI "int drm_gem_mmap(struct\ file\ *\ " "filp" ", struct\ vm_area_struct\ *\ " "vma" ");" .SH "ARGUMENTS" .PP \fIfilp\fR .RS 4 DRM file pointer .RE .PP \fIvma\fR .RS 4 VMA for the area to be mapped .RE .SH "DESCRIPTION" .PP If a driver supports GEM object mapping, mmap calls on the DRM file descriptor will end up here\&. .PP Look up the GEM object based on the offset passed in (vma\->vm_pgoff will contain the fake offset we created when the GTT map ioctl was called on the object) and map it with a call to \fBdrm_gem_mmap_obj\fR\&. .PP If the caller is not granted access to the buffer object, the mmap will fail with EACCES\&. Please see the vma manager for more information\&. .SH "AUTHORS" .PP \fBJesse Barnes\fR <\&jesse.barnes@intel.com\&> .br Intel Corporation, .RS 4 Initial version .RE .PP \fBLaurent Pinchart\fR <\&laurent.pinchart@ideasonboard.com\&> .br Ideas on board SPRL, .RS 4 Driver internals .RE .PP \fBDaniel Vetter\fR <\&daniel.vetter@ffwll.ch\&> .br Intel Corporation, .RS 4 Contributions all over the place .RE .SH "COPYRIGHT" .br