'\" t .\" Title: drm_vma_offset_add .\" 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_VMA_OFFSET_ADD" "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_vma_offset_add \- Add offset node to manager .SH "SYNOPSIS" .HP \w'int\ drm_vma_offset_add('u .BI "int drm_vma_offset_add(struct\ drm_vma_offset_manager\ *\ " "mgr" ", struct\ drm_vma_offset_node\ *\ " "node" ", unsigned\ long\ " "pages" ");" .SH "ARGUMENTS" .PP \fImgr\fR .RS 4 Manager object .RE .PP \fInode\fR .RS 4 Node to be added .RE .PP \fIpages\fR .RS 4 Allocation size visible to user\-space (in number of pages) .RE .SH "DESCRIPTION" .PP Add a node to the offset\-manager\&. If the node was already added, this does nothing and return 0\&. \fIpages\fR is the size of the object given in number of pages\&. After this call succeeds, you can access the offset of the node until it is removed again\&. .PP If this call fails, it is safe to retry the operation or call \fBdrm_vma_offset_remove\fR, anyway\&. However, no cleanup is required in that case\&. .PP \fIpages\fR is not required to be the same size as the underlying memory object that you want to map\&. It only limits the size that user\-space can map into their address space\&. .SH "RETURNS" .PP 0 on success, negative error code on failure\&. .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