<!DOCTYPE html>
<html lang='en'>
<head>
<title>renesas/drm.git - libdrm, cloned from git://anongit.freedesktop.org/mesa/drm</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-css/cgit.css'/>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://gitolite.ideasonboard.com/renesas/drm.git/atom/shared/r128.h?h=android' type='application/atom+xml'/>
<link rel='vcs-git' href='https://gitolite.ideasonboard.com/renesas/drm.git' title='renesas/drm.git Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/logo.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a title='renesas/drm.git' href='/renesas/drm.git/'>renesas/drm.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='98d01f9542d7f70aa10d68c0e41e631b5f156770'/><select name='h' onchange='this.form.submit();'>
<option value='android' selected='selected'>android</option>
<option value='live'>live</option>
<option value='master'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>libdrm, cloned from git://anongit.freedesktop.org/mesa/drm</td><td class='sub right'>Laurent Pinchart</td></tr></table>
<table class='tabs'><tr><td>
<a href='/renesas/drm.git/?h=android'>summary</a><a href='/renesas/drm.git/refs/?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>refs</a><a href='/renesas/drm.git/log/shared/r128.h?h=android'>log</a><a href='/renesas/drm.git/tree/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>tree</a><a class='active' href='/renesas/drm.git/commit/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>commit</a><a href='/renesas/drm.git/diff/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>diff</a></td><td class='form'><form class='right' method='get' action='/renesas/drm.git/log/shared/r128.h'>
<input type='hidden' name='h' value='android'/><input type='hidden' name='id' value='98d01f9542d7f70aa10d68c0e41e631b5f156770'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/renesas/drm.git/commit/?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>root</a>/<a href='/renesas/drm.git/commit/shared?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>shared</a>/<a href='/renesas/drm.git/commit/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>r128.h</a></div><div class='content'><div class='cgit-panel'><b>diff options</b><form method='get'><input type='hidden' name='h' value='android'/><input type='hidden' name='id' value='98d01f9542d7f70aa10d68c0e41e631b5f156770'/><table><tr><td colspan='2'/></tr><tr><td class='label'>context:</td><td class='ctrl'><select name='context' onchange='this.form.submit();'><option value='1'>1</option><option value='2'>2</option><option value='3' selected='selected'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option><option value='10'>10</option><option value='15'>15</option><option value='20'>20</option><option value='25'>25</option><option value='30'>30</option><option value='35'>35</option><option value='40'>40</option></select></td></tr><tr><td class='label'>space:</td><td class='ctrl'><select name='ignorews' onchange='this.form.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Thomas Hellstrom &lt;unichrome@shipmail.org&gt;</td><td class='right'>2004-12-07 12:18:47 +0000</td></tr>
<tr><th>committer</th><td>Thomas Hellstrom &lt;unichrome@shipmail.org&gt;</td><td class='right'>2004-12-07 12:18:47 +0000</td></tr>
<tr><th>commit</th><td colspan='2' class='sha1'><a href='/renesas/drm.git/commit/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>98d01f9542d7f70aa10d68c0e41e631b5f156770</a> (<a href='/renesas/drm.git/patch/shared/r128.h?id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='sha1'><a href='/renesas/drm.git/tree/?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>3fc635433c6dd9c858b877ca2f5ffb8e7b94cb23</a> /<a href='/renesas/drm.git/tree/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>shared/r128.h</a></td></tr>
<tr><th>parent</th><td colspan='2' class='sha1'><a href='/renesas/drm.git/commit/shared/r128.h?h=android&amp;id=bf6eb1c0d47e670658c42e439434c0c25caabcfb'>bf6eb1c0d47e670658c42e439434c0c25caabcfb</a> (<a href='/renesas/drm.git/diff/shared/r128.h?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770&amp;id2=bf6eb1c0d47e670658c42e439434c0c25caabcfb'>diff</a>)</td></tr></table>
<div class='commit-subject'>Patch from Jon Smirl from Nov. 2nd that makes older X servers behave well</div><div class='commit-msg'>    with linux-core. Without this, they will fail on their second
    invocation since the drm already has a busID assigned.
Submitted by: Jon Smirl
</div><div class='diffstat-header'><a href='/renesas/drm.git/diff/?h=android&amp;id=98d01f9542d7f70aa10d68c0e41e631b5f156770'>Diffstat</a> (limited to 'shared/r128.h')</div><table summary='diffstat' class='diffstat'></table><div class='diffstat-summary'>0 files changed, 0 insertions, 0 deletions</div><table summary='diff' class='diff'><tr><td></td></tr></table></div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-12-06 06:16:23 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
n112'>112</a>
<a id='n113' href='#n113'>113</a>
<a id='n114' href='#n114'>114</a>
<a id='n115' href='#n115'>115</a>
<a id='n116' href='#n116'>116</a>
<a id='n117' href='#n117'>117</a>
<a id='n118' href='#n118'>118</a>
<a id='n119' href='#n119'>119</a>
<a id='n120' href='#n120'>120</a>
<a id='n121' href='#n121'>121</a>
<a id='n122' href='#n122'>122</a>
<a id='n123' href='#n123'>123</a>
<a id='n124' href='#n124'>124</a>
<a id='n125' href='#n125'>125</a>
<a id='n126' href='#n126'>126</a>
<a id='n127' href='#n127'>127</a>
<a id='n128' href='#n128'>128</a>
<a id='n129' href='#n129'>129</a>
<a id='n130' href='#n130'>130</a>
<a id='n131' href='#n131'>131</a>
<a id='n132' href='#n132'>132</a>
<a id='n133' href='#n133'>133</a>
<a id='n134' href='#n134'>134</a>
<a id='n135' href='#n135'>135</a>
<a id='n136' href='#n136'>136</a>
<a id='n137' href='#n137'>137</a>
<a id='n138' href='#n138'>138</a>
<a id='n139' href='#n139'>139</a>
<a id='n140' href='#n140'>140</a>
<a id='n141' href='#n141'>141</a>
<a id='n142' href='#n142'>142</a>
<a id='n143' href='#n143'>143</a>
<a id='n144' href='#n144'>144</a>
<a id='n145' href='#n145'>145</a>
<a id='n146' href='#n146'>146</a>
<a id='n147' href='#n147'>147</a>
<a id='n148' href='#n148'>148</a>
<a id='n149' href='#n149'>149</a>
<a id='n150' href='#n150'>150</a>
<a id='n151' href='#n151'>151</a>
</pre></td>
<td class='lines'><pre><code><span class="hl kwa">\chapter</span><span class="hl opt">{</span>Introduction<span class="hl opt">}</span>

<span class="hl kwa">\input</span><span class="hl opt">{</span>abstract.tex<span class="hl opt">}</span>

<span class="hl kwa">\begin</span><span class="hl opt">{</span>description<span class="hl opt">}</span>
<span class="hl kwa">\item</span><span class="hl opt">[</span>Straightforward:<span class="hl opt">]</span> Virtio devices use normal bus mechanisms of
  interrupts and DMA which should be familiar to any device driver
  author. There is no exotic page-flipping or COW mechanism: it&apos;s just
  a normal device.<span class="hl kwa">\footnote</span><span class="hl opt">{</span>This lack of page-sharing implies that the implementation of the
device (e.g. the hypervisor or host) needs full access to the
guest memory. Communication with untrusted parties (i.e.
inter-guest communication) requires copying.
<span class="hl opt">}</span>

<span class="hl kwa">\item</span><span class="hl opt">[</span>Efficient:<span class="hl opt">]</span> Virtio devices consist of rings of descriptors
  for both input and output, which are neatly laid out to avoid cache
  effects from both driver and device writing to the same cache
  lines.

<span class="hl kwa">\item</span><span class="hl opt">[</span>Standard:<span class="hl opt">]</span> Virtio makes no assumptions about the environment in which
  it operates, beyond supporting the bus to which device is attached.
  In this specification, virtio
  devices are implemented over MMIO, Channel I/O and PCI bus transports
<span class="hl kwa">\footnote</span><span class="hl opt">{</span>The Linux implementation further separates the virtio
transport code from the specific virtio drivers: these drivers are shared
between different transports.
<span class="hl opt">}</span>, earlier drafts
  have been implemented on other buses not included here.

<span class="hl kwa">\item</span><span class="hl opt">[</span>Extensible:<span class="hl opt">]</span> Virtio devices contain feature bits which are
  acknowledged by the guest operating system during device setup.
  This allows forwards and backwards compatibility: the device
  offers all the features it knows about, and the driver
  acknowledges those it understands and wishes to use.
<span class="hl kwa">\end</span><span class="hl opt">{</span>description<span class="hl opt">}</span>

<span class="hl kwa">\section</span><span class="hl opt">{</span>Normative References<span class="hl opt">}</span>

<span class="hl kwa">\begin</span><span class="hl opt">{</span>longtable<span class="hl opt">}{</span>l p<span class="hl opt">{</span><span class="hl num">5</span>in<span class="hl opt">}}</span>
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:rfc2119<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>RFC2119<span class="hl opt">]}</span> &amp;
Bradner S., ``Key words for use in RFCs to Indicate Requirement
Levels&apos;&apos;, BCP <span class="hl num">14</span>, RFC <span class="hl num">2119</span>, March <span class="hl num">1997</span>. <span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://www.ietf.org/rfc/rfc2119.txt<span class="hl opt">}</span>\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:S390 PoP<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>S390 PoP<span class="hl opt">]}</span> &amp; z/Architecture Principles of Operation, IBM Publication SA22-<span class="hl num">7832</span>, <span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://publibfi.boulder.ibm.com/epubs/pdf/dz9zr009.pdf<span class="hl opt">}</span>, and any future revisions\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:S390 Common I/O<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>S390 Common I/O<span class="hl opt">]}</span> &amp; ESA/<span class="hl num">390</span> Common I/O-Device and Self-Description, IBM Publication SA22-<span class="hl num">7204</span>, <span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/BOOKS/dz9ar501/CCONTENTS<span class="hl opt">}</span>, and any future revisions\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:PCI<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>PCI<span class="hl opt">]}</span> &amp;
	Conventional PCI Specifications,
	<span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://www.pcisig.com/specifications/conventional/<span class="hl opt">}</span>,
	PCI-SIG\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:PCIe<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>PCIe<span class="hl opt">]}</span> &amp;
	PCI Express Specifications
	<span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://www.pcisig.com/specifications/pciexpress/<span class="hl opt">}</span>,
	PCI-SIG\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:IEEE <span class="hl num">802</span><span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>IEEE <span class="hl num">802</span><span class="hl opt">]}</span> &amp;
	IEEE Standard for Local and Metropolitan Area Networks: Overview and Architecture,
	<span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://standards.ieee.org/about/get/<span class="hl num">802</span>/<span class="hl num">802</span>.html<span class="hl opt">}</span>,
	IEEE\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:SAM<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>SAM<span class="hl opt">]}</span> &amp;
        SCSI Architectural Model,
        <span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://www.t10.org/cgi-bin/ac.pl?t=f&amp;f=sam4r05.pdf<span class="hl opt">}</span>\\
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:SCSI MMC<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>SCSI MMC<span class="hl opt">]}</span> &amp;
        SCSI Multimedia Commands,
        <span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://www.t10.org/cgi-bin/ac.pl?t=f&amp;f=mmc6r00.pdf<span class="hl opt">}</span>\\

<span class="hl kwa">\end</span><span class="hl opt">{</span>longtable<span class="hl opt">}</span>

<span class="hl kwa">\section</span><span class="hl opt">{</span>Non-Normative References<span class="hl opt">}</span>

<span class="hl kwa">\begin</span><span class="hl opt">{</span>longtable<span class="hl opt">}{</span>l p<span class="hl opt">{</span><span class="hl num">5</span>in<span class="hl opt">}}</span>
	<span class="hl kwa">\phantomsection\label</span><span class="hl opt">{</span>intro:Virtio PCI Draft<span class="hl opt">}</span><span class="hl kwa">\textbf</span><span class="hl opt">{[</span>Virtio PCI Draft<span class="hl opt">]}</span> &amp;
	Virtio PCI Draft Specification
	<span class="hl kwa">\newline\url</span><span class="hl opt">{</span>http://ozlabs.org/~rusty/virtio-spec/virtio-<span class="hl num">0.9.5</span>.pdf<span class="hl opt">}</span>\\
<span class="hl kwa">\end</span><span class="hl opt">{</span>longtable<span class="hl opt">}</span>

<span class="hl kwa">\section</span><span class="hl opt">{</span>Terminology<span class="hl opt">}</span><span class="hl kwa">\label</span><span class="hl opt">{</span>Terminology<span class="hl opt">}</span>

The key words ``MUST&apos;&apos;, ``MUST NOT&apos;&apos;, ``REQUIRED&apos;&apos;, ``SHALL&apos;&apos;, ``SHALL NOT&apos;&apos;, ``SHOULD&apos;&apos;, ``SHOULD NOT&apos;&apos;, ``RECOMMENDED&apos;&apos;, ``MAY&apos;&apos;, and ``OPTIONAL&apos;&apos; in this <span class="hl kwb">document</span> are to be interpreted as described in <span class="hl kwa">\hyperref</span><span class="hl opt">[</span>intro:rfc2119<span class="hl opt">]{[</span>RFC2119<span class="hl opt">]}</span>.

<span class="hl kwa">\subsection</span><span class="hl opt">{</span>Legacy Interface: Terminology<span class="hl opt">}</span><span class="hl kwa">\label</span><span class="hl opt">{</span>intro:Legacy
Interface: Terminology<span class="hl opt">}</span>

Earlier drafts of this specification (i.e. revisions before <span class="hl num">1.0</span>,
see e.g. <span class="hl kwa">\hyperref</span><span class="hl opt">[</span>intro:Virtio PCI Draft<span class="hl opt">]{[</span>Virtio PCI Draft<span class="hl opt">]}</span>)
defined a similar, but different
interface between the driver and the device.
Since these are widely deployed, this specification
accommodates OPTIONAL features to simplify transition
from these earlier draft interfaces.

Specifically devices and drivers MAY support:
<span class="hl kwa">\begin</span><span class="hl opt">{</span>description<span class="hl opt">}</span>
<span class="hl kwa">\item</span><span class="hl opt">[</span>Legacy Interface<span class="hl opt">]</span>
        is an interface specified by an earlier draft of this specification
        (before <span class="hl num">1.0</span>)
<span class="hl kwa">\item</span><span class="hl opt">[</span>Legacy Device<span class="hl opt">]</span>
        is a device implemented before this specification was released,
        and implementing a legacy interface on the host side
<span class="hl kwa">\item</span><span class="hl opt">[</span>Legacy Driver<span class="hl opt">]</span>
        is a driver implemented before this specification was released,
        and implementing a legacy interface on the guest side
<span class="hl kwa">\end</span><span class="hl opt">{</span>description<span class="hl opt">}</span>

Legacy devices and legacy drivers are not compliant with this
specification.

To simplify transition from these earlier draft interfaces,
a device MAY implement:

<span class="hl kwa">\begin</span><span class="hl opt">{</span>description<span class="hl opt">}</span>
<span class="hl kwa">\item</span><span class="hl opt">[</span>Transitional Device<span class="hl opt">]</span>
        a device supporting both drivers conforming to this
        specification, and allowing legacy drivers.
<span class="hl kwa">\end</span><span class="hl opt">{</span>description<span class="hl opt">}</span>

Similarly, a driver MAY implement:
<span class="hl kwa">\begin</span><span class="hl opt">{</span>description<span class="hl opt">}</span>
<span class="hl kwa">\item</span><span class="hl opt">[</span>Transitional Driver<span class="hl opt">]</span>
        a driver supporting both devices conforming to this
        specification, and legacy devices.
<span class="hl kwa">\end</span><span class="hl opt">{</span>description<span class="hl opt">}</span>

<span class="hl kwa">\begin</span><span class="hl opt">{</span>note<span class="hl opt">}</span>
  Legacy interfaces are not required; ie. don&apos;t implement them unless you
  have a need for backwards compatibility!
<span class="hl kwa">\end</span><span class="hl opt">{</span>note<span class="hl opt">}</span>

Devices or drivers with no legacy compatibility are referred to as
non-transitional devices and drivers, respectively.

<span class="hl kwa">\section</span><span class="hl opt">{</span>Structure Specifications<span class="hl opt">}</span>

Many device and driver in-memory structure layouts are documented using
the C struct syntax. All structures are assumed to be without additional
padding. To stress this, cases where common C compilers are known to insert
extra padding within structures are tagged using the GNU C
__attribute__((packed))  syntax.

For the integer data types used in the structure definitions, the following
conventions are used:

<span class="hl kwa">\begin</span><span class="hl opt">{</span>description<span class="hl opt">}</span>
<span class="hl kwa">\item</span><span class="hl opt">[</span>u8, u16, u32, u64<span class="hl opt">]</span> An unsigned integer of the specified length in bits.

<span class="hl kwa">\item</span><span class="hl opt">[</span>le16, le32, le64<span class="hl opt">]</span> An unsigned integer of the specified length in bits,
in little-endian byte order.

<span class="hl kwa">\item</span><span class="hl opt">[</span>be16, be32, be64<span class="hl opt">]</span> An unsigned integer of the specified length in bits,
in big-endian byte order.
<span class="hl kwa">\end</span><span class="hl opt">{</span>description<span class="hl opt">}</span>

<span class="hl kwa">\newpage</span>

</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-12-06 06:16:23 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
