---
name: "drm_mm_insert_node_generic"
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_mm_insert_node_generic"
---

# drm\_mm\_insert\_node\_generic(9)

search for space and insert node

## NAME

drm\_mm\_insert\_node\_generic - search for space and insert *node*

## SYNOPSIS

**int drm\_mm\_insert\_node\_generic(struct drm\_mm \*** *mm***, struct drm\_mm\_node \*** *node***, unsigned long** *size***, unsigned** *alignment***, unsigned long** *color***, enum drm\_mm\_search\_flags** *sflags***, enum drm\_mm\_allocator\_flags** *aflags***);**

## ARGUMENTS

*mm*

drm\_mm to allocate from

*node*

preallocate node to insert

*size*

size of the allocation

*alignment*

alignment of the allocation

*color*

opaque tag value to use for this node

*sflags*

flags to fine-tune the allocation search

*aflags*

flags to fine-tune the allocation behavior

## DESCRIPTION

The preallocated node must be cleared to 0.

## RETURNS

0 on success, -ENOSPC if there's no suitable hole.

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