1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>alloc_pt_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="ch04s03.html#idp1128435628" title="Global GTT views"><link rel="prev" href="API-i915-dma-map-single.html" title="i915_dma_map_single"><link rel="next" href="API-i915-vma-bind.html" title="i915_vma_bind"></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">alloc_pt_range</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-i915-dma-map-single.html">Prev</a> </td><th width="60%" align="center">Global GTT views</th><td width="20%" align="right"> <a accesskey="n" href="API-i915-vma-bind.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-alloc-pt-range"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>alloc_pt_range — 2 Allocate a multiple page tables 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">alloc_pt_range </b>(</code></td><td>struct i915_page_directory_entry * <var class="pdparam">pd</var>, </td></tr><tr><td> </td><td>uint16_t <var class="pdparam">pde</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">count</var>, </td></tr><tr><td> </td><td>struct drm_device * <var class="pdparam">dev</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1128456668"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>pd</code></em></span></dt><dd><p> 4 The page directory which will have at least <em class="parameter"><code>count</code></em> entries 5 available to point to the allocated page tables. 6 </p></dd><dt><span class="term"><em class="parameter"><code>pde</code></em></span></dt><dd><p> 7 First page directory entry for which we are allocating. 8 </p></dd><dt><span class="term"><em class="parameter"><code>count</code></em></span></dt><dd><p> 9 Number of pages to allocate. 10 </p></dd><dt><span class="term"><em class="parameter"><code>dev</code></em></span></dt><dd><p> 11 DRM device. 12 </p></dd></dl></div></div><div class="refsect1"><a name="idp1128461772"></a><h2>Description</h2><p> 13 Allocates multiple page table pages and sets the appropriate entries in the 14 page table structure within the page directory. Function cleans up after 15 itself on any failures. 16</p></div><div class="refsect1"><a name="idp1128462556"></a><h2>Return</h2><p> 17 0 if allocation succeeded. 18</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-i915-dma-map-single.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html#idp1128435628">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-i915-vma-bind.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">i915_dma_map_single</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">i915_vma_bind</span></td></tr></table></div></body></html> 19