1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>drm_mm_insert_node_in_range</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux DRM Developer's Guide"><link rel="up" href="drm-memory-management.html#idp1119448692" title="DRM MM Range Allocator Function References"><link rel="prev" href="API-drm-mm-insert-node.html" title="drm_mm_insert_node"><link rel="next" href="API-drm-gem-cma-create.html" title="drm_gem_cma_create"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">drm_mm_insert_node_in_range</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-drm-mm-insert-node.html">Prev</a>&#160;</td><th width="60%" align="center">DRM MM Range Allocator Function References</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-drm-gem-cma-create.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-drm-mm-insert-node-in-range"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>drm_mm_insert_node_in_range &#8212; 
2     ranged search for space and insert <em class="parameter"><code>node</code></em>
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">drm_mm_insert_node_in_range </b>(</code></td><td>struct drm_mm * <var class="pdparam">mm</var>, </td></tr><tr><td>&#160;</td><td>struct drm_mm_node * <var class="pdparam">node</var>, </td></tr><tr><td>&#160;</td><td>u64 <var class="pdparam">size</var>, </td></tr><tr><td>&#160;</td><td>unsigned <var class="pdparam">alignment</var>, </td></tr><tr><td>&#160;</td><td>u64 <var class="pdparam">start</var>, </td></tr><tr><td>&#160;</td><td>u64 <var class="pdparam">end</var>, </td></tr><tr><td>&#160;</td><td>enum drm_mm_search_flags <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1123217036"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>mm</code></em></span></dt><dd><p>
4     drm_mm to allocate from
5    </p></dd><dt><span class="term"><em class="parameter"><code>node</code></em></span></dt><dd><p>
6     preallocate node to insert
7    </p></dd><dt><span class="term"><em class="parameter"><code>size</code></em></span></dt><dd><p>
8     size of the allocation
9    </p></dd><dt><span class="term"><em class="parameter"><code>alignment</code></em></span></dt><dd><p>
10     alignment of the allocation
11    </p></dd><dt><span class="term"><em class="parameter"><code>start</code></em></span></dt><dd><p>
12     start of the allowed range for this node
13    </p></dd><dt><span class="term"><em class="parameter"><code>end</code></em></span></dt><dd><p>
14     end of the allowed range for this node
15    </p></dd><dt><span class="term"><em class="parameter"><code>flags</code></em></span></dt><dd><p>
16     flags to fine-tune the allocation
17    </p></dd></dl></div></div><div class="refsect1"><a name="idp1123224620"></a><h2>Description</h2><p>
18   This is a simplified version of <code class="function">drm_mm_insert_node_in_range_generic</code> with
19   <em class="parameter"><code>color</code></em> set to 0.
20   </p><p>
21
22   The preallocated node must be cleared to 0.
23</p></div><div class="refsect1"><a name="idp1123226092"></a><h2>Returns</h2><p>
24   0 on success, -ENOSPC if there's no suitable hole.
25</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-drm-mm-insert-node.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="drm-memory-management.html#idp1119448692">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-drm-gem-cma-create.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">drm_mm_insert_node</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">drm_gem_cma_create</span></td></tr></table></div></body></html>
26