dptx: Removed EDID structure from Dptx structure.
Instead, moved it to the application level and functions operating on the Edid take a pointer to the Edid as an argument. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
701b2bca5f
commit
ee6966c323
4 changed files with 19 additions and 22 deletions
|
@ -266,15 +266,16 @@ u32 Dptx_StartLink(XDptx *InstancePtr)
|
|||
static void Dptx_StartVideoStream(XDptx *InstancePtr)
|
||||
{
|
||||
u32 Status;
|
||||
u8 AuxData[1];
|
||||
u8 Edid[XDPTX_EDID_SIZE];
|
||||
|
||||
/* Set the bits per color. If not set, the default is 6. */
|
||||
XDptx_CfgMsaSetBpc(InstancePtr, XDPTX_STREAM_ID1, 8);
|
||||
|
||||
/* Choose a method for selecting the video mode. There are 3 ways to do this:
|
||||
* 1) Use the preferred timing from the monitor's EDID:
|
||||
* XDptx_GetEdid(InstancePtr);
|
||||
* XDptx_CfgMsaUseEdidPreferredTiming(InstancePtr, XDPTX_STREAM_ID1);
|
||||
* u8 Edid[XDPTX_EDID_SIZE];
|
||||
* XDptx_GetEdid(InstancePtr, Edid);
|
||||
* XDptx_CfgMsaUseEdidPreferredTiming(InstancePtr, XDPTX_STREAM_ID1, Edid);
|
||||
*
|
||||
* 2) Use a standard video timing mode (see mode_table.h):
|
||||
* XDptx_CfgMsaUseStandardVideoMode(InstancePtr, XDPTX_STREAM_ID1,
|
||||
|
@ -296,10 +297,10 @@ static void Dptx_StartVideoStream(XDptx *InstancePtr)
|
|||
* XDptx_CfgMsaUseCustom(InstancePtr, XDPTX_STREAM_ID1,
|
||||
* &MsaConfigCustom, 1);
|
||||
*/
|
||||
Status = XDptx_GetEdid(InstancePtr);
|
||||
Status = XDptx_GetEdid(InstancePtr, Edid);
|
||||
if (Status == XST_SUCCESS) {
|
||||
XDptx_CfgMsaUseEdidPreferredTiming(InstancePtr,
|
||||
XDPTX_STREAM_ID1);
|
||||
XDPTX_STREAM_ID1, Edid);
|
||||
}
|
||||
else {
|
||||
XDptx_CfgMsaUseStandardVideoMode(InstancePtr, XDPTX_STREAM_ID1,
|
||||
|
@ -307,9 +308,7 @@ static void Dptx_StartVideoStream(XDptx *InstancePtr)
|
|||
}
|
||||
|
||||
/* Disable MST for this example. */
|
||||
AuxData[0] = 0;
|
||||
XDptx_AuxWrite(InstancePtr, XDPTX_DPCD_MSTM_CTRL, 0x1, AuxData);
|
||||
XDptx_WriteReg(InstancePtr->Config.BaseAddr, XDPTX_TX_MST_CONFIG, 0x0);
|
||||
XDptx_MstDisable(InstancePtr);
|
||||
|
||||
/* Disable main stream to force sending of IDLE patterns. */
|
||||
XDptx_DisableMainLink(InstancePtr);
|
||||
|
|
|
@ -331,6 +331,7 @@ u32 XDptx_GetRxCapabilities(XDptx *InstancePtr)
|
|||
* (EDID).
|
||||
*
|
||||
* @param InstancePtr is a pointer to the XDptx instance.
|
||||
* @param A pointer to the Edid buffer to save to.
|
||||
*
|
||||
* @return
|
||||
* - XST_SUCCESS if the I2C transactions to read the EDID were
|
||||
|
@ -342,22 +343,19 @@ u32 XDptx_GetRxCapabilities(XDptx *InstancePtr)
|
|||
* @note None.
|
||||
*
|
||||
*******************************************************************************/
|
||||
u32 XDptx_GetEdid(XDptx *InstancePtr)
|
||||
u32 XDptx_GetEdid(XDptx *InstancePtr, u8 *Edid)
|
||||
{
|
||||
u32 Status;
|
||||
|
||||
/* Verify arguments. */
|
||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||
Xil_AssertNonvoid(InstancePtr->RxConfig.Edid != NULL);
|
||||
Xil_AssertNonvoid(Edid != NULL);
|
||||
|
||||
Status = XDptx_IicRead(InstancePtr, XDPTX_EDID_ADDR, 0, XDPTX_EDID_SIZE,
|
||||
InstancePtr->RxConfig.Edid);
|
||||
if (Status != XST_SUCCESS) {
|
||||
return XST_FAILURE;
|
||||
}
|
||||
Edid);
|
||||
|
||||
return XST_SUCCESS;
|
||||
return Status;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -364,9 +364,6 @@ typedef struct {
|
|||
/**< The raw capabilities field
|
||||
of the RX device's DisplayPort
|
||||
Configuration Data (DPCD). */
|
||||
u8 Edid[XDPTX_EDID_SIZE]; /**< The RX device's raw Extended
|
||||
Display Identification Data
|
||||
(EDID). */
|
||||
u8 LaneStatusAdjReqs[6]; /**< This is a raw read of the
|
||||
RX device's status registers.
|
||||
The first 4 bytes correspond to
|
||||
|
@ -745,7 +742,7 @@ u32 XDptx_InitializeTx(XDptx *InstancePtr);
|
|||
void XDptx_CfgInitialize(XDptx *InstancePtr, XDptx_Config *ConfigPtr,
|
||||
u32 EffectiveAddr);
|
||||
u32 XDptx_GetRxCapabilities(XDptx *InstancePtr);
|
||||
u32 XDptx_GetEdid(XDptx *InstancePtr);
|
||||
u32 XDptx_GetEdid(XDptx *InstancePtr, u8 *Edid);
|
||||
|
||||
/* xdptx.c: Link policy maker functions. */
|
||||
u32 XDptx_CfgMainLinkMax(XDptx *InstancePtr);
|
||||
|
@ -784,7 +781,8 @@ void XDptx_SetUserTimerHandler(XDptx *InstancePtr,
|
|||
void XDptx_CfgMsaRecalculate(XDptx *InstancePtr, u8 Stream);
|
||||
void XDptx_CfgMsaUseStandardVideoMode(XDptx *InstancePtr, u8 Stream,
|
||||
XDptx_VideoMode VideoMode);
|
||||
void XDptx_CfgMsaUseEdidPreferredTiming(XDptx *InstancePtr, u8 Stream);
|
||||
void XDptx_CfgMsaUseEdidPreferredTiming(XDptx *InstancePtr, u8 Stream,
|
||||
u8 *Edid);
|
||||
void XDptx_CfgMsaUseCustom(XDptx *InstancePtr, u8 Stream,
|
||||
XDptx_MainStreamAttributes *MsaConfigCustom, u8 Recalculate);
|
||||
void XDptx_CfgMsaSetBpc(XDptx *InstancePtr, u8 Stream, u8 BitsPerColor);
|
||||
|
|
|
@ -316,6 +316,7 @@ void XDptx_CfgMsaUseStandardVideoMode(XDptx *InstancePtr, u8 Stream,
|
|||
* @param InstancePtr is a pointer to the XDptx instance
|
||||
* @param Stream is the stream number for which the MSA values will be
|
||||
* used for.
|
||||
* @param Edid is a pointer to the Edid to use for the specified stream.
|
||||
*
|
||||
* @return None.
|
||||
*
|
||||
|
@ -324,7 +325,7 @@ void XDptx_CfgMsaUseStandardVideoMode(XDptx *InstancePtr, u8 Stream,
|
|||
* of the sink monitor.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void XDptx_CfgMsaUseEdidPreferredTiming(XDptx *InstancePtr, u8 Stream)
|
||||
void XDptx_CfgMsaUseEdidPreferredTiming(XDptx *InstancePtr, u8 Stream, u8 *Edid)
|
||||
{
|
||||
XDptx_MainStreamAttributes *MsaConfig;
|
||||
u8 *Ptm;
|
||||
|
@ -334,9 +335,10 @@ void XDptx_CfgMsaUseEdidPreferredTiming(XDptx *InstancePtr, u8 Stream)
|
|||
Xil_AssertVoid((Stream == XDPTX_STREAM_ID1) ||
|
||||
(Stream == XDPTX_STREAM_ID2) || (Stream == XDPTX_STREAM_ID3) ||
|
||||
(Stream == XDPTX_STREAM_ID4));
|
||||
Xil_AssertVoid(Edid != NULL);
|
||||
|
||||
MsaConfig = &InstancePtr->MsaConfig[Stream - 1];
|
||||
Ptm = &InstancePtr->RxConfig.Edid[XDPTX_EDID_PTM];
|
||||
Ptm = &Edid[XDPTX_EDID_PTM];
|
||||
|
||||
/* Configure the MSA values with the PTM information as
|
||||
* specified by the preferred Detailed Timing Descriptor (DTD) of the
|
||||
|
|
Loading…
Add table
Reference in a new issue