1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gen8_init_indirectctx_bb</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.5" title="Logical Rings, Logical Ring Contexts and Execlists"><link rel="prev" href="API-intel-execlists-submission.html" title="intel_execlists_submission"><link rel="next" href="API-gen8-init-perctx-bb.html" title="gen8_init_perctx_bb"></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_init_indirectctx_bb</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-intel-execlists-submission.html">Prev</a> </td><th width="60%" align="center">Logical Rings, Logical Ring Contexts and Execlists</th><td width="20%" align="right"> <a accesskey="n" href="API-gen8-init-perctx-bb.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-gen8-init-indirectctx-bb"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>gen8_init_indirectctx_bb — 
2     initialize indirect ctx batch with WA
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_init_indirectctx_bb </b>(</code></td><td>struct intel_engine_cs * <var class="pdparam">ring</var>, </td></tr><tr><td> </td><td>struct i915_wa_ctx_bb * <var class="pdparam">wa_ctx</var>, </td></tr><tr><td> </td><td>uint32_t *const <var class="pdparam">batch</var>, </td></tr><tr><td> </td><td>uint32_t * <var class="pdparam">offset</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.4.3.5.5.27.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>ring</code></em></span></dt><dd><p>
4     only applicable for RCS
5    </p></dd><dt><span class="term"><em class="parameter"><code>wa_ctx</code></em></span></dt><dd><p>
6     structure representing wa_ctx
7    </p></dd><dt><span class="term"><em class="parameter"><code>batch</code></em></span></dt><dd><p>
8     page in which WA are loaded
9    </p></dd><dt><span class="term"><em class="parameter"><code>offset</code></em></span></dt><dd><p>
10     This field specifies the start of the batch, it should be
11     cache-aligned otherwise it is adjusted accordingly.
12     Typically we only have one indirect_ctx and per_ctx batch buffer which are
13     initialized at the beginning and shared across all contexts but this field
14     helps us to have multiple batches at different offsets and select them based
15     on a criteria. At the moment this batch always start at the beginning of the page
16     and at this point we don't have multiple wa_ctx batch buffers.
17    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.4.3.5.5.27.6"></a><h2>offset</h2><p>
18   specifies start of the batch, should be cache-aligned. This is updated
19   with the offset value received as input.
20</p></div><div class="refsect1"><a name="id-1.4.3.5.5.27.7"></a><h2>size</h2><p>
21   size of the batch in DWORDS but HW expects in terms of cachelines
22</p></div><div class="refsect1"><a name="id-1.4.3.5.5.27.8"></a><h2>Description</h2><p>
23   The number of WA applied are not known at the beginning; we use this field
24   to return the no of DWORDS written.
25   </p><p>
26
27   It is to be noted that this batch does not contain MI_BATCH_BUFFER_END
28   so it adds NOOPs as padding to make it cacheline aligned.
29   MI_BATCH_BUFFER_END will be added to perctx batch and both of them together
30   makes a complete batch buffer.
31</p></div><div class="refsect1"><a name="id-1.4.3.5.5.27.9"></a><h2>Return</h2><p>
32   non-zero if we exceed the PAGE_SIZE limit.
33</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-execlists-submission.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html#id-1.4.3.5.5">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-gen8-init-perctx-bb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">intel_execlists_submission</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_init_perctx_bb</span></td></tr></table></div></body></html>
34