1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>i915_parse_cmds</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#idp1128258212" title="Batchbuffer Parsing"><link rel="prev" href="API-i915-needs-cmd-parser.html" title="i915_needs_cmd_parser"><link rel="next" href="API-i915-cmd-parser-get-version.html" title="i915_cmd_parser_get_version"></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">i915_parse_cmds</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-i915-needs-cmd-parser.html">Prev</a>&#160;</td><th width="60%" align="center">Batchbuffer Parsing</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-i915-cmd-parser-get-version.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-i915-parse-cmds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>i915_parse_cmds &#8212; 
2     parse a submitted batch buffer for privilege violations
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">i915_parse_cmds </b>(</code></td><td>struct intel_engine_cs * <var class="pdparam">ring</var>, </td></tr><tr><td>&#160;</td><td>struct drm_i915_gem_object * <var class="pdparam">batch_obj</var>, </td></tr><tr><td>&#160;</td><td>struct drm_i915_gem_object * <var class="pdparam">shadow_batch_obj</var>, </td></tr><tr><td>&#160;</td><td>u32 <var class="pdparam">batch_start_offset</var>, </td></tr><tr><td>&#160;</td><td>u32 <var class="pdparam">batch_len</var>, </td></tr><tr><td>&#160;</td><td>bool <var class="pdparam">is_master</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1128293860"></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     the ring on which the batch is to execute
5    </p></dd><dt><span class="term"><em class="parameter"><code>batch_obj</code></em></span></dt><dd><p>
6     the batch buffer in question
7    </p></dd><dt><span class="term"><em class="parameter"><code>shadow_batch_obj</code></em></span></dt><dd><p>
8     copy of the batch buffer in question
9    </p></dd><dt><span class="term"><em class="parameter"><code>batch_start_offset</code></em></span></dt><dd><p>
10     byte offset in the batch at which execution starts
11    </p></dd><dt><span class="term"><em class="parameter"><code>batch_len</code></em></span></dt><dd><p>
12     length of the commands in batch_obj
13    </p></dd><dt><span class="term"><em class="parameter"><code>is_master</code></em></span></dt><dd><p>
14     is the submitting process the drm master?
15    </p></dd></dl></div></div><div class="refsect1"><a name="idp1128300732"></a><h2>Description</h2><p>
16   Parses the specified batch buffer looking for privilege violations as
17   described in the overview.
18</p></div><div class="refsect1"><a name="idp1128301436"></a><h2>Return</h2><p>
19   non-zero if the parser finds violations or otherwise fails; -EACCES
20   if the batch appears legal but should use hardware parsing
21</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-needs-cmd-parser.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch04s03.html#idp1128258212">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-i915-cmd-parser-get-version.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">i915_needs_cmd_parser</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">i915_cmd_parser_get_version</span></td></tr></table></div></body></html>
22