dptx: Added a method for overriding the user pixel width of the MSA structure.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2014-08-18 00:33:03 -07:00 committed by Jagannadha Sutradharudu Teki
parent 5c5f8b85a6
commit a448e98992
3 changed files with 18 additions and 8 deletions

View file

@ -304,6 +304,11 @@ static void Dptx_StartVideoStream(XDptx *InstancePtr)
* MsaConfigCustom.Dmt.VBackPorch = 38;
* XDptx_CfgMsaUseCustom(InstancePtr, XDPTX_STREAM_ID0,
* &MsaConfigCustom, 1);
*
* To override the user pixel width:
* InstancePtr->MsaConfig[_STREAM#_].OverrideUserPixelWidth = 1;
* InstancePtr->MsaConfig[_STREAM#_].UserPixelWidth = _DESIRED_VALUE_;
* Then, use one of the methods above to calculate the rest of the MSA.
*/
Status = XDptx_GetEdid(InstancePtr, Edid);
if (Status == XST_SUCCESS) {

View file

@ -504,6 +504,9 @@ typedef struct {
use by the video stream. */
u8 SynchronousClockMode; /**< Synchronous clock mode is currently
in use by the video stream. */
u8 OverrideUserPixelWidth; /**< If set to 1, the value stored for
UserPixelWidth will be used as
the pixel width. */
} XDptx_MainStreamAttributes;
/**

View file

@ -139,16 +139,18 @@ void XDptx_CfgMsaRecalculate(XDptx *InstancePtr, u8 Stream)
/* Set the user pixel width to handle clocks that exceed the
* capabilities of the DisplayPort TX core. */
if ((MsaConfig->Dmt.PixelClkKhz > 300000) &&
if (MsaConfig->OverrideUserPixelWidth == 0) {
if ((MsaConfig->Dmt.PixelClkKhz > 300000) &&
(LinkConfig->LaneCount == XDPTX_LANE_COUNT_SET_4)) {
MsaConfig->UserPixelWidth = 4;
}
else if ((MsaConfig->Dmt.PixelClkKhz > 75000) &&
MsaConfig->UserPixelWidth = 4;
}
else if ((MsaConfig->Dmt.PixelClkKhz > 75000) &&
(LinkConfig->LaneCount != XDPTX_LANE_COUNT_SET_1)) {
MsaConfig->UserPixelWidth = 2;
}
else {
MsaConfig->UserPixelWidth = 1;
MsaConfig->UserPixelWidth = 2;
}
else {
MsaConfig->UserPixelWidth = 1;
}
}
/* Compute the rest of the MSA values. */