---
name: "drm_gem_mmap"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/drm_gem_mmap"
---

# drm\_gem\_mmap(9)

memory map routine for GEM objects

## NAME

drm\_gem\_mmap - memory map routine for GEM objects

## SYNOPSIS

**int drm\_gem\_mmap(struct file \*** *filp***, struct vm\_area\_struct \*** *vma***);**

## ARGUMENTS

*filp*

DRM file pointer

*vma*

VMA for the area to be mapped

## DESCRIPTION

If a driver supports GEM object mapping, mmap calls on the DRM file descriptor will end up here.

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 **drm\_gem\_mmap\_obj**.

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.

## AUTHORS

**Jesse Barnes** \<jesse.barnes@intel.com\>\
 Intel Corporation,

Initial version

**Laurent Pinchart** \<laurent.pinchart@ideasonboard.com\>\
 Ideas on board SPRL,

Driver internals

**Daniel Vetter** \<daniel.vetter@ffwll.ch\>\
 Intel Corporation,

Contributions all over the place

## COPYRIGHT
