1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gen8_ppgtt_alloc_pagetabs</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux GPU Driver Developer's Guide"><link rel="up" href="ch04s03.html#id-1.4.3.5.6" title="Global GTT views"><link rel="prev" href="API-intel-lr-context-deferred-alloc.html" title="intel_lr_context_deferred_alloc"><link rel="next" href="API-gen8-ppgtt-alloc-page-directories.html" title="gen8_ppgtt_alloc_page_directories"></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">gen8_ppgtt_alloc_pagetabs</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-intel-lr-context-deferred-alloc.html">Prev</a> </td><th width="60%" align="center">Global GTT views</th><td width="20%" align="right"> <a accesskey="n" href="API-gen8-ppgtt-alloc-page-directories.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-gen8-ppgtt-alloc-pagetabs"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gen8_ppgtt_alloc_pagetabs — 2 Allocate page tables for VA range. 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">gen8_ppgtt_alloc_pagetabs </b>(</code></td><td>struct i915_address_space * <var class="pdparam">vm</var>, </td></tr><tr><td> </td><td>struct i915_page_directory * <var class="pdparam">pd</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">start</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">length</var>, </td></tr><tr><td> </td><td>unsigned long * <var class="pdparam">new_pts</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.4.3.5.6.20.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>vm</code></em></span></dt><dd><p> 4 Master vm structure. 5 </p></dd><dt><span class="term"><em class="parameter"><code>pd</code></em></span></dt><dd><p> 6 Page directory for this address range. 7 </p></dd><dt><span class="term"><em class="parameter"><code>start</code></em></span></dt><dd><p> 8 Starting virtual address to begin allocations. 9 </p></dd><dt><span class="term"><em class="parameter"><code>length</code></em></span></dt><dd><p> 10 Size of the allocations. 11 </p></dd><dt><span class="term"><em class="parameter"><code>new_pts</code></em></span></dt><dd><p> 12 Bitmap set by function with new allocations. Likely used by the 13 caller to free on error. 14 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.4.3.5.6.20.6"></a><h2>Description</h2><p> 15 Allocate the required number of page tables. Extremely similar to 16 <code class="function"><a class="link" href="API-gen8-ppgtt-alloc-page-directories.html" title="gen8_ppgtt_alloc_page_directories">gen8_ppgtt_alloc_page_directories</a></code>. The main difference is here we are limited by 17 the page directory boundary (instead of the page directory pointer). That 18 boundary is 1GB virtual. Therefore, unlike <code class="function"><a class="link" href="API-gen8-ppgtt-alloc-page-directories.html" title="gen8_ppgtt_alloc_page_directories">gen8_ppgtt_alloc_page_directories</a></code>, it is 19 possible, and likely that the caller will need to use multiple calls of this 20 function to achieve the appropriate allocation. 21</p></div><div class="refsect1"><a name="id-1.4.3.5.6.20.7"></a><h2>Return</h2><p> 22 0 if success; negative error code otherwise. 23</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-intel-lr-context-deferred-alloc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html#id-1.4.3.5.6">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-gen8-ppgtt-alloc-page-directories.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">intel_lr_context_deferred_alloc</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">gen8_ppgtt_alloc_page_directories</span></td></tr></table></div></body></html> 24