---
name: "drm_gem_create_mmap_offset"
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_create_mmap_offset"
---

# drm\_gem\_create\_mmap\_offset(9)

create a fake mmap offset for an object

## NAME

drm\_gem\_create\_mmap\_offset - create a fake mmap offset for an object

## SYNOPSIS

**int drm\_gem\_create\_mmap\_offset(struct drm\_gem\_object \*** *obj***);**

## ARGUMENTS

*obj*

obj in question

## DESCRIPTION

GEM memory mapping works by handing back to userspace a fake mmap offset it can use in a subsequent [mmap(2)](/mmap/2.md) call. The DRM core code then looks up the object based on the offset and sets up the various memory mapping structures.

This routine allocates and attaches a fake offset for *obj*.

## 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
