diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/index.html b/XilinxProcessorIPLib/drivers/dprxss/examples/index.html index d5e1fd5f..ee0f8f20 100644 --- a/XilinxProcessorIPLib/drivers/dprxss/examples/index.html +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/index.html @@ -7,14 +7,15 @@ -

Example applications for the dprxss_v1_0 driver.

+

Example applications for the dprxss_v2_0 driver.


-

Copyright � 1995-2015 Xilinx, Inc. All rights reserved.

+

Copyright © 1995-2015 Xilinx, Inc. All rights reserved.

diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/readme.txt b/XilinxProcessorIPLib/drivers/dprxss/examples/readme.txt index 2264fc09..fee82484 100644 --- a/XilinxProcessorIPLib/drivers/dprxss/examples/readme.txt +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/readme.txt @@ -1,3 +1,15 @@ +******************************************************************************/ +*
+* MODIFICATION HISTORY:
+*
+* Ver  Who Date     Changes
+* ---- --- -------- --------------------------------------------------
+* 1.00 sha 10/05/15 Added modification header
+*                   Changed DpTxSs_Setup --> DpRxSs_Setup.
+*                   Added HDCP example.
+* 
+* +******************************************************************************/ 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_*. diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_debug_example.c b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_debug_example.c index ecfb0b29..4ab14bf5 100644 --- a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_debug_example.c +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_debug_example.c @@ -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. * * ******************************************************************************/ @@ -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 */ diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_hdcp_example.c b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_hdcp_example.c new file mode 100644 index 00000000..679776a8 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_hdcp_example.c @@ -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. +* +*
+* MODIFICATION HISTORY:
+*
+* Ver  Who Date     Changes
+* ---- --- -------- --------------------------------------------------
+* 1.00 sha 10/05/15 Initial release.
+* 
+* +******************************************************************************/ + +/***************************** 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; +} diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_intr_example.c b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_intr_example.c index ee901bd4..327a3288 100644 --- a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_intr_example.c +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_intr_example.c @@ -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. * *
@@ -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.
 * 
* ******************************************************************************/ @@ -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"); -} - /*****************************************************************************/ /** * diff --git a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_mst_example.c b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_mst_example.c index f167870b..8f3c708e 100644 --- a/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_mst_example.c +++ b/XilinxProcessorIPLib/drivers/dprxss/examples/xdprxss_mst_example.c @@ -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. * *
@@ -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.
 * 
* ******************************************************************************/ @@ -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 */