Software Drivers

xdprx.c File Reference


Detailed Description

Contains a minimal set of functions for the XDprx driver that allow access to all of the DisplayPort RX core's functionality. See xdprx.h for a detailed description of the driver.

Note:
None.
 MODIFICATION HISTORY:

 Ver   Who  Date     Changes
 ----- ---- -------- -----------------------------------------------
 1.0   als  01/20/14 Initial release.
 

#include "xdprx.h"
#include "xstatus.h"

Functions

void XDprx_CfgInitialize (XDprx *InstancePtr, XDp_Config *ConfigPtr, u32 EffectiveAddr)
u32 XDprx_InitializeRx (XDprx *InstancePtr)
u32 XDprx_CheckLinkStatus (XDprx *InstancePtr)
void XDprx_DtgEn (XDprx *InstancePtr)
void XDprx_DtgDis (XDprx *InstancePtr)
void XDprx_SetLinkRate (XDprx *InstancePtr, u8 LinkRate)
void XDprx_SetLaneCount (XDprx *InstancePtr, u8 LaneCount)
void XDprx_SetUserPixelWidth (XDprx *InstancePtr, u8 UserPixelWidth)
void XDprx_SetUserTimerHandler (XDprx *InstancePtr, XDp_TimerHandler CallbackFunc, void *CallbackRef)
void XDprx_WaitUs (XDprx *InstancePtr, u32 MicroSeconds)


Function Documentation

void XDprx_CfgInitialize ( XDprx InstancePtr,
XDp_Config ConfigPtr,
u32  EffectiveAddr 
)

This function retrieves the configuration for this DisplayPort RX instance and fills in the InstancePtr->Config structure.

Parameters:
InstancePtr is a pointer to the XDprx instance.
ConfigPtr is a pointer to the configuration structure that will be used to copy the settings from.
EffectiveAddr is the device base address in the virtual memory space. If the address translation is not used, then the physical address is passed.
Returns:
None.
Note:
Unexpected errors may occur if the address mapping is changed after this function is invoked.

u32 XDprx_CheckLinkStatus ( XDprx InstancePtr  ) 

This function checks if the reciever's internal registers indicate that link training has complete. That is, training has achieved channel equalization, symbol lock, and interlane alignment for all lanes currently in use.

Parameters:
InstancePtr is a pointer to the XDprx instance.
Returns:
  • XST_SUCCESS if the RX device has achieved clock recovery, channel equalization, symbol lock, and interlane alignment.
  • XST_FAILURE otherwise.
Note:
None.

void XDprx_DtgDis ( XDprx InstancePtr  ) 

This function disables the display timing generator (DTG).

Parameters:
InstancePtr is a pointer to the XDprx instance.
Returns:
None.
Note:
None.

void XDprx_DtgEn ( XDprx InstancePtr  ) 

This function enables the display timing generator (DTG).

Parameters:
InstancePtr is a pointer to the XDprx instance.
Returns:
None.
Note:
None.

u32 XDprx_InitializeRx ( XDprx InstancePtr  ) 

This function prepares the DisplayPort RX core for use.

Parameters:
InstancePtr is a pointer to the XDprx instance.
Returns:
  • XST_SUCCESS if the DisplayPort RX core was successfully initialized.
  • XST_FAILURE otherwise.
Note:
None.

void XDprx_SetLaneCount ( XDprx InstancePtr,
u8  LaneCount 
)

This function sets the maximum lane count to be exposed in the RX device's DisplayPort Configuration Data (DPCD) registers.

Parameters:
InstancePtr is a pointer to the XDprx instance.
LaneCount is the number of lanes to be used over the main link.
Returns:
None.
Note:
None.

void XDprx_SetLinkRate ( XDprx InstancePtr,
u8  LinkRate 
)

This function sets the maximum data rate to be exposed in the RX device's DisplayPort Configuration Data (DPCD) registers.

Parameters:
InstancePtr is a pointer to the XDprx instance.
LinkRate is the link rate to be used over the main link based on one of the following selects:
  • XDPRX_LINK_BW_SET_162GBPS = 0x06 (for a 1.62 Gbps data rate)
  • XDPRX_LINK_BW_SET_270GBPS = 0x0A (for a 2.70 Gbps data rate)
  • XDPRX_LINK_BW_SET_540GBPS = 0x14 (for a 5.40 Gbps data rate)
Returns:
None.
Note:
None.

void XDprx_SetUserPixelWidth ( XDprx InstancePtr,
u8  UserPixelWidth 
)

This function configures the number of pixels output through the user data interface.

Parameters:
InstancePtr is a pointer to the XDprx instance.
UserPixelWidth is the user pixel width to be configured.
Returns:
None.
Note:
None.

void XDprx_SetUserTimerHandler ( XDprx InstancePtr,
XDp_TimerHandler  CallbackFunc,
void *  CallbackRef 
)

This function installs a custom delay/sleep function to be used by the XDprx driver.

Parameters:
InstancePtr is a pointer to the XDprx instance.
CallbackFunc is the address to the callback function.
CallbackRef is the user data item (microseconds to delay) that will be passed to the custom sleep/delay function when it is invoked.
Returns:
None.
Note:
None.

void XDprx_WaitUs ( XDprx InstancePtr,
u32  MicroSeconds 
)

This function is the delay/sleep function for the XDprx driver. For the Zynq family, there exists native sleep functionality. For MicroBlaze however, there does not exist such functionality. In the MicroBlaze case, the default method for delaying is to use a predetermined amount of loop iterations. This method is prone to inaccuracy and dependent on system configuration; for greater accuracy, the user may supply their own delay/sleep handler, pointed to by InstancePtr->UserTimerWaitUs, which may have better accuracy if a hardware timer is used.

Parameters:
InstancePtr is a pointer to the XDprx instance.
MicroSeconds is the number of microseconds to delay/sleep for.
Returns:
None.
Note:
None.

Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.