dprxss: Added HDCP example

This patch adds HDCP example and modifies examples, index, readme files.

Signed-off-by: Shadul Shaikh <shaduls@xilinx.com>
Acked-by: Andrei Simion <andreis@xilinx.com>
This commit is contained in:
Shadul Shaikh 2015-10-14 17:20:52 +05:30 committed by Nava kishore Manne
parent 879b09fd24
commit 4ef87ec22c
6 changed files with 447 additions and 164 deletions

View file

@ -7,14 +7,15 @@
<link rel="stylesheet" type="text/css" href="../help.css">
</head>
<body bgcolor="#FFFFFF">
<h1> Example applications for the dprxss_v1_0 driver. </h1>
<h1> Example applications for the dprxss_v2_0 driver. </h1>
<HR>
<ul>
<li>xdprxss_debug_example.c <a href="xdprxss_debug_example.c">(source)</a> </li>
<li>xdprxss_hdcp_example.c <a href="xdprxss_hdcp_example.c">(source)</a> </li>
<li>xdprxss_intr_example.c <a href="xdprxss_intr_example.c">(source)</a> </li>
<li>xdprxss_mst_example.c <a href="xdprxss_mst_example.c">(source)</a> </li>
<li>xdprxss_selftest_example.c <a href="xdprxss_selftest_example.c">(source)</a> </li>
</ul>
<p><font face="Times New Roman" color="#800000">Copyright <EFBFBD> 1995-2015 Xilinx, Inc. All rights reserved.</font></p>
<p><font face="Times New Roman" color="#800000">Copyright © 1995-2015 Xilinx, Inc. All rights reserved.</font></p>
</body>
</html>

View file

@ -1,3 +1,15 @@
******************************************************************************/
* <pre>
* MODIFICATION HISTORY:
*
* Ver Who Date Changes
* ---- --- -------- --------------------------------------------------
* 1.00 sha 10/05/15 Added modification header
* Changed DpTxSs_Setup --> DpRxSs_Setup.
* Added HDCP example.
* </pre>
*
******************************************************************************/
There are 4 DisplayPort Receiver Subsystem examples include in this directory:
1) xdprxss_selftest_example.c : This self test example will call self test
functions of each DisplayPort RX Subsystem's sub-cores to verify that the sub-cores
@ -15,14 +27,17 @@ There are 4 DisplayPort Receiver Subsystem examples include in this directory:
4) xdprxss_debug_example.c : The debug example setup MST/SST mode based on system confi-
guration parameters and prints debug information at the end.
5) xdprxss_hdcp_example.c : The HDCP example setup SST mode and enables the HDCP after
RX has started.
Additionally, in order to be able to use the interrupt, MST/SST, and debug examples,
the user will need to implement following functions:
1) DpRxSs_PlatformInit : This function needs to do all hardware system
initialization.
2) DpRxSs_VideoPhyInit : These function need to configure the Video Phy using video phy
driver functions. For information, refer video phy driver documentation.
3) DpTxSs_Setup : These function need to configure the DisplayPort TX Subsystem using
DPTX Subsystem driver functions. For information, refer DPTXSS driver documentation.
3) DpRxSs_Setup : These function need to configure the DisplayPort RX Subsystem using
DPRX Subsystem driver functions. For information, refer DPRXSS driver documentation.
Note: All example functions start with DpRxSs_*, while all DisplayPort RX Subsystem
driver functions start with XDpRxSs_*.

View file

@ -41,11 +41,11 @@
* @note For this example to display output, the user need to implement
* initialization of the system (DpRxSs_PlatformInit), Video Phy
* (DpRxSs_VideoPhyInit), start DisplayPort RX subsystem
* (XDpRxSs_Start) and DisplayPort TX Subsystem setup
* (DpTxSs_Setup).
* (XDpRxSs_Start) and DisplayPort RX Subsystem setup
* (DpRxSs_Setup).
* The input to the Subsystem is from RX (GT).
* The functions DpRxSs_PlatformInit, DpRxSs_VideoPhyInit and
* DpTxSs_Setup are declared and are left up to the user to
* DpRxSs_Setup are declared and are left up to the user to
* implement.
* In addition to the setups, this example requires to implement
* required interrupts to view the output.
@ -56,6 +56,8 @@
* Ver Who Date Changes
* ---- --- -------- --------------------------------------------------
* 1.00 sha 07/29/15 Initial release.
* 2.00 sha 10/05/15 Changed DpTxSs_Setup --> DpRxSs_Setup.
* Added HDCP debug function.
* </pre>
*
******************************************************************************/
@ -94,7 +96,7 @@
u32 DpRxSs_DebugExample(u16 DeviceId);
u32 DpRxSs_PlatformInit(void);
u32 DpRxSs_VideoPhyInit(void);
u32 DpTxSs_Setup(void);
u32 DpRxSs_Setup(void);
/************************** Variable Definitions *****************************/
@ -210,8 +212,8 @@ u32 DpRxSs_DebugExample(u16 DeviceId)
/* Setup Video Phy, left to the user for implementation */
DpRxSs_VideoPhyInit();
/* Setup DPTX SS, left to the user for implementation */
DpTxSs_Setup();
/* Setup DPRX SS, left to the user for implementation */
DpRxSs_Setup();
/* Print available sub-cores of subsystem */
XDpRxSs_ReportCoreInfo(&DpRxSsInst);
@ -222,6 +224,11 @@ u32 DpRxSs_DebugExample(u16 DeviceId)
/* Print Multi-stream attributes being set during subsystem set up */
XDpRxSs_ReportMsaInfo(&DpRxSsInst);
/* Print HDCP debug info if HDCP is present. Otherwise unsupported
* info
*/
XDpRxSs_ReportHdcpInfo(&DpRxSsInst);
return XST_SUCCESS;
}
@ -271,18 +278,18 @@ u32 DpRxSs_VideoPhyInit(void)
/*****************************************************************************/
/**
*
* This function configures DisplayPort TX Subsystem.
* This function configures DisplayPort RX Subsystem.
*
* @param None.
*
* @return
* - XST_SUCCESS if DPTX Subsystem configured successfully.
* - XST_SUCCESS if DPRX Subsystem configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpTxSs_Setup(void)
u32 DpRxSs_Setup(void)
{
/* User is responsible to setup Video Phy */

View file

@ -0,0 +1,326 @@
/******************************************************************************
*
* Copyright (C) 2015 Xilinx, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* Use of the Software is limited solely to applications:
* (a) running on a Xilinx device, or
* (b) that interact with a Xilinx device through a bus or interconnect.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Except as contained in this notice, the name of the Xilinx shall not be used
* in advertising or otherwise to promote the sale, use or other dealings in
* this Software without prior written authorization from Xilinx.
*
******************************************************************************/
/*****************************************************************************/
/**
*
* @file xdprxss_hdcp_example.c
*
* This file contains a design example using the XDpRxSs driver in single stream
* (SST) transport or multi-stream transport (MST) mode and enables HDCP.
*
* @note For this example to display output, the user need to implement
* initialization of the system (DpRxSs_PlatformInit), Video Phy
* (DpRxSs_VideoPhyInit), start DisplayPort RX subsystem
* (XDpRxSs_Start) and DisplayPort RX Subsystem setup
* (DpRxSs_Setup).
* The input to the Subsystem is from RX (GT).
* The functions DpRxSs_PlatformInit, DpRxSs_VideoPhyInit and
* DpRxSs_Setup are declared and are left up to the user to
* implement.
* In addition to the setups, this example requires to implement
* required interrupts to view the output.
*
* <pre>
* MODIFICATION HISTORY:
*
* Ver Who Date Changes
* ---- --- -------- --------------------------------------------------
* 1.00 sha 10/05/15 Initial release.
* </pre>
*
******************************************************************************/
/***************************** Include Files *********************************/
#include "xdprxss.h"
#include "xil_printf.h"
#include "xil_types.h"
#include "xparameters.h"
#include "xstatus.h"
#include "string.h"
/************************** Constant Definitions *****************************/
/* The unique device ID of the DisplayPort Receiver Subsystem HIP instance
* to be used
*/
#define XDPRXSS_DEVICE_ID XPAR_DPRXSS_0_DEVICE_ID
/* Example will run either in MST or SST mode based upon config parameters.
* In MST mode, this example exposes maximum number of input and output ports
* of DP RX that will be included while replying to sideband messages from TX.
*/
#define DPRXSS_LINK_RATE XDPRXSS_LINK_BW_SET_540GBPS
#define DPRXSS_LANE_COUNT XDPRXSS_LANE_COUNT_SET_4
/***************** Macros (Inline Functions) Definitions *********************/
/**************************** Type Definitions *******************************/
/************************** Function Prototypes ******************************/
u32 DpRxSs_HdcpExample(u16 DeviceId);
u32 DpRxSs_PlatformInit(void);
u32 DpRxSs_VideoPhyInit(void);
u32 DpRxSs_Setup(void);
/************************** Variable Definitions *****************************/
XDpRxSs DpRxSsInst; /* The DPRX Subsystem instance.*/
/************************** Function Definitions *****************************/
/*****************************************************************************/
/**
*
* This is the main function for XDpRxSs SST/MST example.
*
* @param None.
*
* @return
* - XST_SUCCESS if the MST/SST example passed.
* - XST_FAILURE if the MST/SST example was unsuccessful.
*
* @note None.
*
******************************************************************************/
int main()
{
u32 Status;
xil_printf("-------------------------------------------\n\r");
xil_printf("DisplayPort RX Subsystem HDCP example\n\r");
xil_printf("(c) 2015 by Xilinx\n\r");
xil_printf("-------------------------------------------\n\r\n\r");
Status = DpRxSs_HdcpExample(XDPRXSS_DEVICE_ID);
if (Status != XST_SUCCESS) {
xil_printf("DisplayPort RX Subsystem HDCP example failed."
"\n\r");
return XST_FAILURE;
}
xil_printf("DisplayPort RX Subsystem HDCP example passed\n\r");
return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function is the main entry point for the HDCP example using the
* XDpRxSs driver. This function will enable HDCP during DisplayPort RX
* Subsystem set up to work in MST/SST mode.
*
* @param DeviceId is the unique device ID of the DisplayPort RX
* Subsystem core.
*
* @return
* - XST_SUCCESS if DisplayPort RX Subsystem HDCP enabled
* successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpRxSs_HdcpExample(u16 DeviceId)
{
u32 Status;
XDpRxSs_Config *ConfigPtr;
/* Do platform initialization in this function. This is hardware
* system specific. It is up to the user to implement this function.
*/
xil_printf("PlatformInit\n\r");
Status = DpRxSs_PlatformInit();
if (Status != XST_SUCCESS) {
xil_printf("Platform init failed!\n\r");
}
xil_printf("Platform initialization done.\n\r");
/* Obtain the device configuration for the DisplayPort RX Subsystem */
ConfigPtr = XDpRxSs_LookupConfig(DeviceId);
if (!ConfigPtr) {
return XST_FAILURE;
}
/* Copy the device configuration into the DpRxSsInst's Config
* structure. */
Status = XDpRxSs_CfgInitialize(&DpRxSsInst, ConfigPtr,
ConfigPtr->BaseAddress);
if (Status != XST_SUCCESS) {
xil_printf("DPRXSS config initialization failed.\n\r");
return XST_FAILURE;
}
/* Check for SST/MST support */
if (DpRxSsInst.UsrOpt.MstSupport) {
xil_printf("\n\rINFO:DPRXSS is MST enabled. DPRXSS can be "
"switched to SST/MST\n\r\n\r");
}
else {
xil_printf("\n\rINFO:DPRXSS is SST enabled. DPRXSS works "
"only in SST mode.\n\r\n\r");
}
/* Set Link rate and lane count to maximum */
XDpRxSs_SetLinkRate(&DpRxSsInst, DPRXSS_LINK_RATE);
XDpRxSs_SetLaneCount(&DpRxSsInst, DPRXSS_LANE_COUNT);
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
/* Enable HDCP */
Status = XDpRxSs_HdcpEnable(&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP enable failed\n\r");
return XST_FAILURE;
}
/* Set PHY status down */
Status = XDpRxSs_SetPhysicalState(&DpRxSsInst, 0);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP PHY failed\n\r");
return XST_FAILURE;
}
/* Execute HDCP RX state machine */
Status = XDpRxSs_Poll(&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP poll failed\n\r");
return XST_FAILURE;
}
#endif
/* Start DPRXSS */
Status = XDpRxSs_Start(&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS start failed\n\r");
return XST_FAILURE;
}
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
/* Set PHY status up */
Status = XDpRxSs_SetPhysicalState(&DpRxSsInst, 1);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP PHY failed\n\r");
return XST_FAILURE;
}
/* Set authenticate */
Status = XDpRxSs_Authenticate(&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP AUTH failed\n\r");
return XST_FAILURE;
}
/* Execute HDCP RX state machine */
Status = XDpRxSs_Poll(&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR:DPRX SS HDCP poll failed\n\r");
return XST_FAILURE;
}
#endif
/* Setup Video Phy, left to the user for implementation */
DpRxSs_VideoPhyInit();
/* Setup DPRX SS, left to the user for implementation */
DpRxSs_Setup();
return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function initialize required platform specific peripherals.
*
* @param None.
*
* @return
* - XST_SUCCESS if required peripherals are initialized and
* configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpRxSs_PlatformInit(void)
{
/* User is responsible to setup platform specific initialization */
return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function configures Video Phy.
*
* @param None.
*
* @return
* - XST_SUCCESS if Video Phy configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpRxSs_VideoPhyInit(void)
{
/* User is responsible to setup Video Phy */
return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function configures DisplayPort RX Subsystem.
*
* @param None.
*
* @return
* - XST_SUCCESS if DPRX Subsystem configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpRxSs_Setup(void)
{
/* User is responsible to setup Video Phy */
return XST_SUCCESS;
}

View file

@ -46,11 +46,11 @@
* For this example to display output, the user need to implement
* initialization of the system (DpRxSs_PlatformInit), Video Phy
* (DpRxSs_VideoPhyInit), start DisplayPort RX subsystem
* (XDpRxSs_Start) and DisplayPort TX Subsystem setup
* (DpTxSs_Setup).
* (XDpRxSs_Start) and DisplayPort RX Subsystem setup
* (DpRxSs_Setup).
* The input to the Subsystem is from RX (GT).
* The functions DpRxSs_PlatformInit, DpRxSs_VideoPhyInit and
* DpTxSs_Setup are declared and are left up to the user to
* DpRxSs_Setup are declared and are left up to the user to
* implement.
*
* <pre>
@ -59,6 +59,9 @@
* Ver Who Date Changes
* ---- --- -------- --------------------------------------------------
* 1.00 sha 07/29/15 Initial release.
* 2.00 sha 10/05/15 Changed DpTxSs_Setup --> DpRxSs_Setup.
* Removed HDCP callbacks registration and callbacks.
* Added HDCP and Timer Counter interrupt handler setup.
* </pre>
*
******************************************************************************/
@ -88,12 +91,26 @@
* INTC. INTC selection is based on INTC parameters defined xparameters.h file.
*/
#ifdef XPAR_INTC_0_DEVICE_ID
#define XINTC_DPRXSS_DP_INTERRUPT_ID XPAR_INTC_0_DPRXSS_0_DPRXSS_DP_IRQ_VEC_ID
#define XINTC_DPRXSS_DP_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_DP_IRQ_VEC_ID
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
#define XINTC_DPRXSS_HDCP_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_HDCP_IRQ_VEC_ID
#define XINTC_DPRXSS_TMR_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_TIMER_IRQ_VEC_ID
#endif
#define XINTC_DEVICE_ID XPAR_INTC_0_DEVICE_ID
#define XINTC XIntc
#define XINTC_HANDLER XIntc_InterruptHandler
#else /* Else part */
#define XINTC_DPRXSS_DP_INTERRUPT_ID XPAR_INTC_0_DPRXSS_0_DPRXSS_DP_IRQ_VEC_ID
#define XINTC_DPRXSS_DP_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_DP_IRQ_VEC_ID
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
#define XINTC_DPRXSS_HDCP_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_HDCP_IRQ_VEC_ID
#define XINTC_DPRXSS_TMR_INTERRUPT_ID \
XPAR_INTC_0_DPRXSS_0_DPRXSS_TIMER_IRQ_VEC_ID
#endif
#define XINTC_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
#define XINTC XScuGic
#define XINTC_HANDLER XScuGic_InterruptHandler
@ -122,7 +139,7 @@
u32 DpRxSs_IntrExample(u16 DeviceId);
u32 DpRxSs_PlatformInit(void);
u32 DpRxSs_VideoPhyInit(void);
u32 DpTxSs_Setup(void);
u32 DpRxSs_Setup(void);
/* Interrupt helper functions */
@ -144,13 +161,6 @@ void DpRxSs_AudioOverflowHandler(void *InstancePtr);
void DpRxSs_PayloadAllocationHandler(void *InstancePtr);
void DpRxSs_ActRxHandler(void *InstancePtr);
void DpRxSs_CrcTestHandler(void *InstancePtr);
void DpRxSs_HdcpDebugWriteHandler(void *InstancePtr);
void DpRxSs_HdcpAksvWriteHandler(void *InstancePtr);
void DpRxSs_HdcpAnWriteHandler(void *InstancePtr);
void DpRxSs_HdcpAInfoWriteHandler(void *InstancePtr);
void DpRxSs_HdcpRoReadHandler(void *InstancePtr);
void DpRxSs_HdcpBInfoReadHandler(void *InstancePtr);
void DpRxSs_UnplugHandler(void *InstancePtr);
void DpRxSs_LinkBandwidthHandler(void *InstancePtr);
void DpRxSs_PllResetHandler(void *InstancePtr);
@ -280,8 +290,8 @@ u32 DpRxSs_IntrExample(u16 DeviceId)
/* Setup Video Phy, left to the user for implementation */
DpRxSs_VideoPhyInit();
/* Setup DPTX SS, left to the user for implementation */
DpTxSs_Setup();
/* Setup DPRX SS, left to the user for implementation */
DpRxSs_Setup();
/* Do not return in order to allow interrupt handling to run. Different
* types of interrupts will be detected and handled.
@ -337,18 +347,18 @@ u32 DpRxSs_VideoPhyInit(void)
/*****************************************************************************/
/**
*
* This function configures DisplayPort TX Subsystem.
* This function configures DisplayPort RX Subsystem.
*
* @param None.
*
* @return
* - XST_SUCCESS if DP TX Subsystem configured successfully.
* - XST_SUCCESS if DP RX Subsystem configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpTxSs_Setup(void)
u32 DpRxSs_Setup(void)
{
/* User is responsible to setup Video Phy */
@ -414,20 +424,6 @@ u32 DpRxSs_SetupIntrSystem(void)
DpRxSs_ActRxHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_DP_CRC_TEST_EVENT,
DpRxSs_CrcTestHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_DP_HDCP_DBG_WR_EVENT,
DpRxSs_HdcpDebugWriteHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_DP_HDCP_AKSV_WR_EVENT,
DpRxSs_HdcpAksvWriteHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_DP_HDCP_AN_WR_EVENT,
DpRxSs_HdcpAnWriteHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst,
XDPRXSS_HANDLER_DP_HDCP_A_INFO_WR_EVENT,
DpRxSs_HdcpAInfoWriteHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_DP_HDCP_RO_RD_EVENT,
DpRxSs_HdcpRoReadHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst,
XDPRXSS_HANDLER_DP_HDCP_B_INFO_RD_EVENT,
DpRxSs_HdcpBInfoReadHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_UNPLUG_EVENT,
DpRxSs_UnplugHandler, &DpRxSsInst);
XDpRxSs_SetCallBack(&DpRxSsInst, XDPRXSS_HANDLER_LINKBW_EVENT,
@ -457,6 +453,29 @@ u32 DpRxSs_SetupIntrSystem(void)
/* Enable the interrupt vector at the interrupt controller */
XIntc_Enable(IntcInstPtr, XINTC_DPRXSS_DP_INTERRUPT_ID);
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
Status = XIntc_Connect(IntcInstPtr, XINTC_DPRXSS_HDCP_INTERRUPT_ID,
(XInterruptHandler)XDpRxSs_HdcpIntrHandler,
&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR: DP RX SS HDCP interrupt connect failed!\n\r");
return XST_FAILURE;
}
Status = XIntc_Connect(IntcInstPtr, XINTC_DPRXSS_TMR_INTERRUPT_ID,
(XInterruptHandler)XDpRxSs_TmrCtrIntrHandler,
&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR: DP RX SS Timer Counter interrupt connect "
"failed!\n\r");
return XST_FAILURE;
}
/* Enable the interrupt vector at the interrupt controller */
XIntc_Enable(IntcInstPtr, XINTC_DPRXSS_HDCP_INTERRUPT_ID);
XIntc_Enable(IntcInstPtr, XINTC_DPRXSS_TMR_INTERRUPT_ID);
#endif
/* Start the interrupt controller such that interrupts are recognized
* and handled by the processor
*/
@ -493,9 +512,31 @@ u32 DpRxSs_SetupIntrSystem(void)
xil_printf("ERR: DP RX SS DP interrupt connect failed!\n\r");
return XST_FAILURE;
}
/* Enable the interrupt for the Pixel Splitter device */
/* Enable the interrupt for the DP device */
XScuGic_Enable(IntcInstance, XINTC_DPRXSS_DP_INTERRUPT_ID);
#if (XPAR_XHDCP_NUM_INSTANCES > 0)
Status = XScuGic_Connect(IntcInstPtr, XINTC_DPRXSS_HDCP_INTERRUPT_ID,
(Xil_InterruptHandler)XDpRxSs_HdcpIntrHandler,
&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR: DP RX SS HDCP interrupt connect failed!\n\r");
return XST_FAILURE;
}
Status = XScuGic_Connect(IntcInstPtr, XINTC_DPRXSS_TMR_INTERRUPT_ID,
(Xil_InterruptHandler)XDpRxSs_TmrCtrIntrHandler,
&DpRxSsInst);
if (Status != XST_SUCCESS) {
xil_printf("ERR: DP RX SS Timer Counter interrupt connect "
"failed!\n\r");
return XST_FAILURE;
}
/* Enable the interrupt device */
XScuGic_Enable(IntcInstance, XINTC_DPRXSS_HDCP_INTERRUPT_ID);
XScuGic_Enable(IntcInstance, XINTC_DPRXSS_TMR_INTERRUPT_ID);
#endif
#endif
/* Initialize the exception table. */
Xil_ExceptionInit();
@ -802,114 +843,6 @@ void DpRxSs_CrcTestHandler(void *InstancePtr)
xil_printf("Interrupt: CRC test started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the HDCP debug write start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpDebugWriteHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP debug write started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the HDCP AKSV write start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpAksvWriteHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP AKSV write started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the HDCP AN write start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpAnWriteHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP AN write started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the HDCP A info write start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpAInfoWriteHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP A info write started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the HDCP RO read start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpRoReadHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP RO read started.\n\r");
}
/*****************************************************************************/
/**
*
* This function is the callback function for when the B info read start
* interrupt occurs.
*
* @param InstancePtr is a pointer to the XDpRxSs instance.
*
* @return None.
*
* @note None.
*
******************************************************************************/
void DpRxSs_HdcpBInfoReadHandler(void *InstancePtr)
{
xil_printf("Interrupt: HDCP B info read started.\n\r");
}
/*****************************************************************************/
/**
*

View file

@ -40,12 +40,12 @@
* @note For this example to display output, the user need to implement
* initialization of the system (DpRxSs_PlatformInit), Video Phy
* (DpRxSs_VideoPhyInit), start DisplayPort RX subsystem
* (XDpRxSs_Start) and DisplayPort TX Subsystem setup
* (DpTxSs_Setup).
* (XDpRxSs_Start) and DisplayPort RX Subsystem setup
* (DpRxSs_Setup).
* The input to the Subsystem is from RX (GT).
* This example requires an interrupt controller in the system.
* The functions DpRxSs_PlatformInit, DpRxSs_VideoPhyInit and
* DpTxSs_Setup are declared and are left up to the user to
* DpRxSs_Setup are declared and are left up to the user to
* implement.
*
* <pre>
@ -54,6 +54,7 @@
* Ver Who Date Changes
* ---- --- -------- --------------------------------------------------
* 1.00 sha 07/29/15 Initial release.
* 2.00 sha 10/05/15 Changed DpTxSs_Setup --> DpRxSs_Setup.
* </pre>
*
******************************************************************************/
@ -121,7 +122,7 @@
u32 DpRxSs_MstExample(u16 DeviceId);
u32 DpRxSs_PlatformInit(void);
u32 DpRxSs_VideoPhyInit(void);
u32 DpTxSs_Setup(void);
u32 DpRxSs_Setup(void);
/* Interrupt helper functions */
u32 DpRxSs_SetupIntrSystem(void);
@ -263,8 +264,8 @@ u32 DpRxSs_MstExample(u16 DeviceId)
/* Setup Video Phy, left to the user for implementation */
DpRxSs_VideoPhyInit();
/* Setup DPTX SS, left to the user for implementation */
DpTxSs_Setup();
/* Setup DPRX SS, left to the user for implementation */
DpRxSs_Setup();
return XST_SUCCESS;
}
@ -315,18 +316,18 @@ u32 DpRxSs_VideoPhyInit(void)
/*****************************************************************************/
/**
*
* This function configures DisplayPort TX Subsystem.
* This function configures DisplayPort RX Subsystem.
*
* @param None.
*
* @return
* - XST_SUCCESS if DPTX Subsystem configured successfully.
* - XST_SUCCESS if DPRX Subsystem configured successfully.
* - XST_FAILURE, otherwise.
*
* @note None.
*
******************************************************************************/
u32 DpTxSs_Setup(void)
u32 DpRxSs_Setup(void)
{
/* User is responsible to setup Video Phy */