diff --git a/XilinxProcessorIPLib/drivers/dptx/examples/xdptx_example_common.c b/XilinxProcessorIPLib/drivers/dptx/examples/xdptx_example_common.c index c20d38f9..962de449 100644 --- a/XilinxProcessorIPLib/drivers/dptx/examples/xdptx_example_common.c +++ b/XilinxProcessorIPLib/drivers/dptx/examples/xdptx_example_common.c @@ -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) { diff --git a/XilinxProcessorIPLib/drivers/dptx/src/xdptx.h b/XilinxProcessorIPLib/drivers/dptx/src/xdptx.h index 0b44336e..54f85a48 100644 --- a/XilinxProcessorIPLib/drivers/dptx/src/xdptx.h +++ b/XilinxProcessorIPLib/drivers/dptx/src/xdptx.h @@ -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; /** diff --git a/XilinxProcessorIPLib/drivers/dptx/src/xdptx_spm.c b/XilinxProcessorIPLib/drivers/dptx/src/xdptx_spm.c index dbfa2b09..3163ae1e 100644 --- a/XilinxProcessorIPLib/drivers/dptx/src/xdptx_spm.c +++ b/XilinxProcessorIPLib/drivers/dptx/src/xdptx_spm.c @@ -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. */