drm_gem_create_mmap_offset_size(9)

drm_gem_create_mmap_offset_size9

Create a fake mmap offset for an object

Usage

int drm_gem_create_mmap_offset_size(struct drm_gem_object * obj, size_t size);

Arguments

obj

obj in question

size

the virtual size

Overview

GEM memory mapping works by handing back to userspace a fake mmap offset it can use in a subsequent mmap(2) 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, in cases where the virtual size differs from the physical size (ie. obj->size). Otherwise just use drm_gem_create_mmap_offset.

Authors

Jesse Barnes <[email protected]>
Intel Corporation,

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,

Contributions all over the place

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.