dptx: Moved functions related to retrieval of EDID information into xdptx_edid.c
Consolidated the functions that obtain the base EDID block into the EDID utility file. Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
2133642349
commit
bc137caf88
4 changed files with 77 additions and 77 deletions
|
@ -348,39 +348,6 @@ u32 XDptx_GetRxCapabilities(XDptx *InstancePtr)
|
||||||
return XST_SUCCESS;
|
return XST_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
/**
|
|
||||||
* This function retrieves the RX device's Extended Display Identification Data
|
|
||||||
* (EDID).
|
|
||||||
*
|
|
||||||
* @param InstancePtr is a pointer to the XDptx instance.
|
|
||||||
* @param Edid is a pointer to the Edid buffer to save to.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - XST_SUCCESS if the I2C transactions to read the EDID were
|
|
||||||
* successful.
|
|
||||||
* - XST_ERROR_COUNT_MAX if the EDID read request timed out.
|
|
||||||
* - XST_DEVICE_NOT_FOUND if no RX device is connected.
|
|
||||||
* - XST_FAILURE otherwise.
|
|
||||||
*
|
|
||||||
* @note None.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
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(Edid != NULL);
|
|
||||||
|
|
||||||
Status = XDptx_IicRead(InstancePtr, XDPTX_EDID_ADDR, 0,
|
|
||||||
XDPTX_EDID_BLOCK_SIZE, Edid);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
* This function determines the common capabilities between the DisplayPort TX
|
* This function determines the common capabilities between the DisplayPort TX
|
||||||
|
|
|
@ -744,7 +744,6 @@ u32 XDptx_InitializeTx(XDptx *InstancePtr);
|
||||||
void XDptx_CfgInitialize(XDptx *InstancePtr, XDptx_Config *ConfigPtr,
|
void XDptx_CfgInitialize(XDptx *InstancePtr, XDptx_Config *ConfigPtr,
|
||||||
u32 EffectiveAddr);
|
u32 EffectiveAddr);
|
||||||
u32 XDptx_GetRxCapabilities(XDptx *InstancePtr);
|
u32 XDptx_GetRxCapabilities(XDptx *InstancePtr);
|
||||||
u32 XDptx_GetEdid(XDptx *InstancePtr, u8 *Edid);
|
|
||||||
|
|
||||||
/* xdptx.c: Link policy maker functions. */
|
/* xdptx.c: Link policy maker functions. */
|
||||||
u32 XDptx_CfgMainLinkMax(XDptx *InstancePtr);
|
u32 XDptx_CfgMainLinkMax(XDptx *InstancePtr);
|
||||||
|
@ -875,10 +874,11 @@ void XDptx_WriteGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress,
|
||||||
u32 Guid[4]);
|
u32 Guid[4]);
|
||||||
void XDptx_GetGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress,
|
void XDptx_GetGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress,
|
||||||
u32 *Guid);
|
u32 *Guid);
|
||||||
u32 XDptx_GetRemoteEdid(XDptx *InstancePtr, u8 LinkCountTotal,
|
|
||||||
u8 *RelativeAddress, u8 *Edid);
|
|
||||||
|
|
||||||
/* xdptx_edid.c: EDID utility functions. */
|
/* xdptx_edid.c: EDID utility functions. */
|
||||||
|
u32 XDptx_GetEdid(XDptx *InstancePtr, u8 *Edid);
|
||||||
|
u32 XDptx_GetRemoteEdid(XDptx *InstancePtr, u8 LinkCountTotal,
|
||||||
|
u8 *RelativeAddress, u8 *Edid);
|
||||||
u32 XDptx_GetEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum);
|
u32 XDptx_GetEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum);
|
||||||
u32 XDptx_GetRemoteEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum,
|
u32 XDptx_GetRemoteEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum,
|
||||||
u8 LinkCountTotal, u8 *RelativeAddress);
|
u8 LinkCountTotal, u8 *RelativeAddress);
|
||||||
|
|
|
@ -55,6 +55,80 @@
|
||||||
|
|
||||||
/**************************** Function Definitions ****************************/
|
/**************************** Function Definitions ****************************/
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function retrieves an immediately connected RX device's Extended Display
|
||||||
|
* Identification Data (EDID) structure.
|
||||||
|
*
|
||||||
|
* @param InstancePtr is a pointer to the XDptx instance.
|
||||||
|
* @param Edid is a pointer to the Edid buffer to save to.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - XST_SUCCESS if the I2C transactions to read the EDID were
|
||||||
|
* successful.
|
||||||
|
* - XST_ERROR_COUNT_MAX if the EDID read request timed out.
|
||||||
|
* - XST_DEVICE_NOT_FOUND if no RX device is connected.
|
||||||
|
* - XST_FAILURE otherwise.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
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(Edid != NULL);
|
||||||
|
|
||||||
|
Status = XDptx_IicRead(InstancePtr, XDPTX_EDID_ADDR, 0,
|
||||||
|
XDPTX_EDID_BLOCK_SIZE, Edid);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function retrieves a remote RX device's Extended Display Identification
|
||||||
|
* Data (EDID) structure.
|
||||||
|
*
|
||||||
|
* @param InstancePtr is a pointer to the XDptx instance.
|
||||||
|
* @param LinkCountTotal is the number of DisplayPort links from the
|
||||||
|
* DisplayPort source to the target DisplayPort device.
|
||||||
|
* @param RelativeAddress is the relative address from the DisplayPort
|
||||||
|
* source to the target DisplayPort device.
|
||||||
|
* @param Edid is a pointer to the Edid buffer to save to.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - XST_SUCCESS if the I2C transactions to read the EDID were
|
||||||
|
* successful.
|
||||||
|
* - XST_ERROR_COUNT_MAX if the EDID read request timed out.
|
||||||
|
* - XST_DEVICE_NOT_FOUND if no RX device is connected.
|
||||||
|
* - XST_FAILURE otherwise.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
|
u32 XDptx_GetRemoteEdid(XDptx *InstancePtr, u8 LinkCountTotal,
|
||||||
|
u8 *RelativeAddress, u8 *Edid)
|
||||||
|
{
|
||||||
|
u32 Status;
|
||||||
|
|
||||||
|
/* Verify arguments. */
|
||||||
|
Xil_AssertNonvoid(InstancePtr != NULL);
|
||||||
|
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
||||||
|
Xil_AssertNonvoid(LinkCountTotal > 0);
|
||||||
|
Xil_AssertNonvoid((RelativeAddress != NULL) || (LinkCountTotal == 1));
|
||||||
|
Xil_AssertNonvoid(Edid != NULL);
|
||||||
|
|
||||||
|
Status = XDptx_RemoteIicRead(InstancePtr, LinkCountTotal,
|
||||||
|
RelativeAddress, XDPTX_EDID_ADDR, 0, XDPTX_EDID_BLOCK_SIZE,
|
||||||
|
Edid);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
u32 XDptx_GetEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum)
|
u32 XDptx_GetEdidBlock(XDptx *InstancePtr, u8 *Data, u8 BlockNum)
|
||||||
{
|
{
|
||||||
u32 Status;
|
u32 Status;
|
||||||
|
|
|
@ -2044,47 +2044,6 @@ void XDptx_GetGuid(XDptx *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
/**
|
|
||||||
* This function retrieves a remote RX device's Extended Display Identification
|
|
||||||
* Data (EDID).
|
|
||||||
*
|
|
||||||
* @param InstancePtr is a pointer to the XDptx instance.
|
|
||||||
* @param LinkCountTotal is the number of DisplayPort links from the
|
|
||||||
* DisplayPort source to the target DisplayPort device.
|
|
||||||
* @param RelativeAddress is the relative address from the DisplayPort
|
|
||||||
* source to the target DisplayPort device.
|
|
||||||
* @param Edid is a pointer to the Edid buffer to save to.
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* - XST_SUCCESS if the I2C transactions to read the EDID were
|
|
||||||
* successful.
|
|
||||||
* - XST_ERROR_COUNT_MAX if the EDID read request timed out.
|
|
||||||
* - XST_DEVICE_NOT_FOUND if no RX device is connected.
|
|
||||||
* - XST_FAILURE otherwise.
|
|
||||||
*
|
|
||||||
* @note None.
|
|
||||||
*
|
|
||||||
*******************************************************************************/
|
|
||||||
u32 XDptx_GetRemoteEdid(XDptx *InstancePtr, u8 LinkCountTotal,
|
|
||||||
u8 *RelativeAddress, u8 *Edid)
|
|
||||||
{
|
|
||||||
u32 Status;
|
|
||||||
|
|
||||||
/* Verify arguments. */
|
|
||||||
Xil_AssertNonvoid(InstancePtr != NULL);
|
|
||||||
Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
|
|
||||||
Xil_AssertNonvoid(LinkCountTotal > 0);
|
|
||||||
Xil_AssertNonvoid((RelativeAddress != NULL) || (LinkCountTotal == 1));
|
|
||||||
Xil_AssertNonvoid(Edid != NULL);
|
|
||||||
|
|
||||||
Status = XDptx_RemoteIicRead(InstancePtr, LinkCountTotal,
|
|
||||||
RelativeAddress, XDPTX_EDID_ADDR, 0, XDPTX_EDID_BLOCK_SIZE,
|
|
||||||
Edid);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
* This function will check whether or not a DisplayPort device has a global
|
* This function will check whether or not a DisplayPort device has a global
|
||||||
|
|
Loading…
Add table
Reference in a new issue