
Initial DisplayPort TX driver submission. Currently, only supporting SST. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
261 lines
14 KiB
HTML
261 lines
14 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>
|
|
xdptx_spm.c File Reference
|
|
</title>
|
|
<link href="$DriverApiDocsCssPath" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
|
|
<hl>Software Drivers</hl>
|
|
<hr class="whs1">
|
|
<!-- Generated by Doxygen 1.4.7 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul></div>
|
|
<h1>xdptx_spm.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
This file contains the stream policy maker functions for the <a class="el" href="struct_x_dptx.html">XDptx</a> driver. These functions set up the DisplayPort TX core's main stream attributes that determine how a video stream will be displayed.<p>
|
|
<pre>
|
|
MODIFICATION HISTORY:</pre><p>
|
|
<pre> Ver Who Date Changes
|
|
----- ---- -------- -----------------------------------------------
|
|
1.00a als 05/17/14 Initial release.
|
|
</pre>
|
|
<p>
|
|
<code>#include "xdptx.h"</code><br>
|
|
<code>#include "<a class="el" href="xdptx__hw_8h.html">xdptx_hw.h</a>"</code><br>
|
|
<code>#include "xstatus.h"</code><br>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#d6d0ab65e5e57372fb02d3eb3d0c08b4">XDptx_CfgMsaRecalculate</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#d63ef9bd6bfa5653718d5abb26615495">XDptx_CfgMsaUseStandardVideoMode</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr, XDptx_VideoMode VideoMode)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#15e3eafa3e673961309e8eb784d6409b">XDptx_CfgMsaUseEdidPreferredTiming</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#abbab1fd51ea73f8f021cd3fa7f3ff54">XDptx_CfgMsaUseCustom</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr, <a class="el" href="struct_x_dptx___main_stream_attributes.html">XDptx_MainStreamAttributes</a> *MsaConfigCustom, u8 Recalculate)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#a0af5e5b4a2789aa26efb33502f04423">XDptx_CfgMsaSetBpc</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr, u8 BitsPerColor)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xdptx__spm_8c.html#7cd047ab5d5dc46af427086469e7a0db">XDptx_SetVideoMode</a> (<a class="el" href="struct_x_dptx.html">XDptx</a> *InstancePtr)</td></tr>
|
|
|
|
</table>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="d6d0ab65e5e57372fb02d3eb3d0c08b4"></a><!-- doxytag: member="xdptx_spm.c::XDptx_CfgMsaRecalculate" ref="d6d0ab65e5e57372fb02d3eb3d0c08b4" args="(XDptx *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XDptx_CfgMsaRecalculate </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function calculates the following main stream attributes:<ul>
|
|
<li>Transfer unit size</li><li>User pixel width</li><li>NVid</li><li>Horizontal start</li><li>Vertical start</li><li>Horizontal total clock</li><li>Vertical total clock</li><li>Misc0</li><li>Misc1</li><li>Data per lane</li><li>Average number of bytes per transfer unit</li><li>Number of initial wait cycles These values are derived from:</li><li>Bits per color</li><li>MVid</li><li>Horizontal sync polarity</li><li>Vertical sync polarity</li><li>Horizontal sync pulse width</li><li>Vertical sync pulse width</li><li>Horizontal resolution</li><li>Vertical resolution</li><li>Vertical back porch</li><li>Vertical front porch</li><li>Horizontal back porch</li><li>Horizontal front porch</li></ul>
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The MsaConfig structure is modified with the new, calculated values. The main stream attributes that were used to derive the calculated values are untouched in the MsaConfig structure. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="a0af5e5b4a2789aa26efb33502f04423"></a><!-- doxytag: member="xdptx_spm.c::XDptx_CfgMsaSetBpc" ref="a0af5e5b4a2789aa26efb33502f04423" args="(XDptx *InstancePtr, u8 BitsPerColor)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">u32 XDptx_CfgMsaSetBpc </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u8 </td>
|
|
<td class="paramname"> <em>BitsPerColor</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function sets the bits per color value of the video stream.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>BitsPerColor</em> </td><td>is the new number of bits per color to use.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The InstancePtr->MsaConfig structure is modified to reflect the new main stream attributes associated with a new bits per color value.</dd></dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_INVALID_PARAM if the supplied bits per color value is not either 6, 8, 10, 12, or 16.</li><li>XST_SUCCESS otherwise. </li></ul>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="abbab1fd51ea73f8f021cd3fa7f3ff54"></a><!-- doxytag: member="xdptx_spm.c::XDptx_CfgMsaUseCustom" ref="abbab1fd51ea73f8f021cd3fa7f3ff54" args="(XDptx *InstancePtr, XDptx_MainStreamAttributes *MsaConfigCustom, u8 Recalculate)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XDptx_CfgMsaUseCustom </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx___main_stream_attributes.html">XDptx_MainStreamAttributes</a> * </td>
|
|
<td class="paramname"> <em>MsaConfigCustom</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">u8 </td>
|
|
<td class="paramname"> <em>Recalculate</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function takes a the main stream attributes from MsaConfigCustom and copies them into InstancePtr->MsaConfig. If desired, given a base set of attributes, the rest of the attributes may be derived. The minimal required main stream attributes that must be contained in the MsaConfigCustom structure are:<ul>
|
|
<li>MVid</li><li>Horizontal sync polarity</li><li>Vertical sync polarity</li><li>Horizontal sync pulse width</li><li>Vertical sync pulse width</li><li>Horizontal resolution</li><li>Vertical resolution</li><li>Vertical back porch</li><li>Vertical front porch</li><li>Horizontal back porch</li><li>Horizontal front porch</li></ul>
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>MsaConfigCustom</em> </td><td>is the structure that will be used to copy the main stream attributes from (into InstancePtr->MsaConfig). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Recalculate</em> </td><td>is a boolean enable that determines whether or not the main stream attributes should be recalculated.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The InstancePtr-> MsaConfig structure is modified with the new values. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="15e3eafa3e673961309e8eb784d6409b"></a><!-- doxytag: member="xdptx_spm.c::XDptx_CfgMsaUseEdidPreferredTiming" ref="15e3eafa3e673961309e8eb784d6409b" args="(XDptx *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XDptx_CfgMsaUseEdidPreferredTiming </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function sets the main stream attribute values in the configuration structure to match the preferred timing of the sink monitor. This preferred timing information is stored in the sink's extended display identification data (EDID).<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The InstancePtr->MsaConfig structure is modified to reflect the main stream attribute values associated to the preferred timing of the sink monitor. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="d63ef9bd6bfa5653718d5abb26615495"></a><!-- doxytag: member="xdptx_spm.c::XDptx_CfgMsaUseStandardVideoMode" ref="d63ef9bd6bfa5653718d5abb26615495" args="(XDptx *InstancePtr, XDptx_VideoMode VideoMode)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">u32 XDptx_CfgMsaUseStandardVideoMode </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">XDptx_VideoMode </td>
|
|
<td class="paramname"> <em>VideoMode</em></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function sets the main stream attribute values in the configuration structure to match one of the standard display mode timings from the XDptx_DmtModes[] table. THe XDptx_VideoMode enumeration in xdptx.h lists the available video modes.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>VideoMode</em> </td><td>is one of the enumerated standard video modes that is used to determine the main stream attributes to be used.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_INVALID_PARAM if the supplied video mode isn't in the DMT table.</li><li>XST_SUCCESS otherwise.</li></ul>
|
|
</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The InstancePtr->MsaConfig structure is modified to reflect the main stream attribute values associated to the specified video mode. </dd></dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="7cd047ab5d5dc46af427086469e7a0db"></a><!-- doxytag: member="xdptx_spm.c::XDptx_SetVideoMode" ref="7cd047ab5d5dc46af427086469e7a0db" args="(XDptx *InstancePtr)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void XDptx_SetVideoMode </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="struct_x_dptx.html">XDptx</a> * </td>
|
|
<td class="paramname"> <em>InstancePtr</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
This function clears the main stream attributes registers of the DisplayPort TX core and sets them to the values specified in the main stream attributes configuration structure.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_dptx.html">XDptx</a> instance </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.
|