XilinxProcessorIPLib/drivers/dp14rxss/src/xdprxss.c
u32 XDpRxSs_HdcpEnable(XDpRxSs *InstancePtr)
{
	u32 Status1 = XST_SUCCESS, Status2 = XST_SUCCESS;

	/* Verify arguments.*/
	Xil_AssertNonvoid(InstancePtr);
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
	Xil_AssertNonvoid(InstancePtr->Config.HdcpEnable);
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
	Xil_AssertNonvoid(InstancePtr->Config.Hdcp22Enable);
#endif

	switch (InstancePtr->HdcpProtocol) {
		/* Disable HDCP 1.4 and HDCP 2.2 */
		case XDPRXSS_HDCP_NONE :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Disable(
						InstancePtr->Hdcp1xPtr);
				/*  This is needed to ensure that the previous
				 *  command is executed */
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Disable(
						InstancePtr->Hdcp22Ptr);
			}
#endif
			break;

			/* Enable HDCP 1.4 and disable HDCP 2.2 */
		case XDPRXSS_HDCP_14 :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Enable(
						InstancePtr->Hdcp1xPtr);
				/* This is needed to ensure that the previous
				 * command is executed */
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
			else {
				Status1 = XST_FAILURE;
			}
#else
			Status1 = XST_FAILURE;
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Disable(
						InstancePtr->Hdcp22Ptr);
			}
#endif
			break;

			/* Enable HDCP 2.2 and disable HDCP 1.4 */
		case XDPRXSS_HDCP_22 :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Disable(
						InstancePtr->Hdcp1xPtr);
				/* This is needed to ensure that the previous
				 * command is executed. */
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Enable(
						InstancePtr->Hdcp22Ptr);
			}
			else {
				Status2 = XST_FAILURE;
			}
#else
			Status2 = XST_FAILURE;
#endif
			break;

		default :
			return XST_FAILURE;
	}

	return (Status1 == XST_SUCCESS && Status2 == XST_SUCCESS) ?
		XST_SUCCESS : XST_FAILURE;
}
/*****************************************************************************/
/**
*
* This function enables the requested HDCP protocol. This function
* ensures that the HDCP protocols are mutually exclusive such that
* either HDCP 1.4 or HDCP 2.2 is enabled and active at any given time.
* When the protocol is set to None, both HDCP protocols are disabled.
*
* @param	InstancePtr is a pointer to the XDpRxSs core instance.
*
* @return
*		- XST_SUCCESS, if HDCP i/f enabled successfully.
*		- XST_FAILURE, otherwise.
*
* @note		None.
*
******************************************************************************/
This function enables the requested HDCP protocol. This function
ensures that the HDCP protocols are mutually exclusive such that
either HDCP 1.4 or HDCP 2.2 is enabled and active at any given time.
When the protocol is set to None, both HDCP protocols are disabled.
This function enables the requested HDCP protocol . This function ensures that the HDCP protocols are mutually exclusive such that either HDCP 1 . 4 or HDCP 2 . 2 is enabled and active at any given time . When the protocol is set to None both HDCP protocols are disabled .
u32 XDpRxSs_HdcpEnable(XDpRxSs *InstancePtr)
{
	u32 Status1 = XST_SUCCESS, Status2 = XST_SUCCESS;
	Xil_AssertNonvoid(InstancePtr);
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
	Xil_AssertNonvoid(InstancePtr->Config.HdcpEnable);
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
	Xil_AssertNonvoid(InstancePtr->Config.Hdcp22Enable);
#endif
	switch (InstancePtr->HdcpProtocol) {
		case XDPRXSS_HDCP_NONE :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Disable(
						InstancePtr->Hdcp1xPtr);
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Disable(
						InstancePtr->Hdcp22Ptr);
			}
#endif
			break;
		case XDPRXSS_HDCP_14 :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Enable(
						InstancePtr->Hdcp1xPtr);
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
			else {
				Status1 = XST_FAILURE;
			}
#else
			Status1 = XST_FAILURE;
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Disable(
						InstancePtr->Hdcp22Ptr);
			}
#endif
			break;
		case XDPRXSS_HDCP_22 :
#if (XPAR_DPRXSS_0_HDCP_ENABLE > 0)
			if (InstancePtr->Hdcp1xPtr) {
				Status1 = XHdcp1x_Disable(
						InstancePtr->Hdcp1xPtr);
				XHdcp1x_Poll(InstancePtr->Hdcp1xPtr);
			}
#endif
#if (XPAR_XHDCP22_RX_NUM_INSTANCES > 0)
			if (InstancePtr->Hdcp22Ptr) {
				Status2 = XHdcp22Rx_Enable(
						InstancePtr->Hdcp22Ptr);
			}
			else {
				Status2 = XST_FAILURE;
			}
#else
			Status2 = XST_FAILURE;
#endif
			break;
		default :
			return XST_FAILURE;
	}
	return (Status1 == XST_SUCCESS && Status2 == XST_SUCCESS) ?
		XST_SUCCESS : XST_FAILURE;
}
u32 XDpRxSs_HdcpEnable ( XDpRxSs * InstancePtr ) { u32 Status1 = XST_SUCCESS , Status2 = XST_SUCCESS ; Xil_AssertNonvoid ( InstancePtr ) ; #if ( XPAR_DPRXSS_0_HDCP_ENABLE > 0 ) Xil_AssertNonvoid ( InstancePtr -> Config . HdcpEnable ) ; #endif #if ( XPAR_XHDCP22_RX_NUM_INSTANCES > 0 ) Xil_AssertNonvoid ( InstancePtr -> Config . Hdcp22Enable ) ; #endif switch ( InstancePtr -> HdcpProtocol ) { case XDPRXSS_HDCP_NONE : #if ( XPAR_DPRXSS_0_HDCP_ENABLE > 0 ) if ( InstancePtr -> Hdcp1xPtr ) { Status1 = XHdcp1x_Disable ( InstancePtr -> Hdcp1xPtr ) ; XHdcp1x_Poll ( InstancePtr -> Hdcp1xPtr ) ; } #endif #if ( XPAR_XHDCP22_RX_NUM_INSTANCES > 0 ) if ( InstancePtr -> Hdcp22Ptr ) { Status2 = XHdcp22Rx_Disable ( InstancePtr -> Hdcp22Ptr ) ; } #endif break ; case XDPRXSS_HDCP_14 : #if ( XPAR_DPRXSS_0_HDCP_ENABLE > 0 ) if ( InstancePtr -> Hdcp1xPtr ) { Status1 = XHdcp1x_Enable ( InstancePtr -> Hdcp1xPtr ) ; XHdcp1x_Poll ( InstancePtr -> Hdcp1xPtr ) ; } else { Status1 = XST_FAILURE ; } #else Status1 = XST_FAILURE ; #endif #if ( XPAR_XHDCP22_RX_NUM_INSTANCES > 0 ) if ( InstancePtr -> Hdcp22Ptr ) { Status2 = XHdcp22Rx_Disable ( InstancePtr -> Hdcp22Ptr ) ; } #endif break ; case XDPRXSS_HDCP_22 : #if ( XPAR_DPRXSS_0_HDCP_ENABLE > 0 ) if ( InstancePtr -> Hdcp1xPtr ) { Status1 = XHdcp1x_Disable ( InstancePtr -> Hdcp1xPtr ) ; XHdcp1x_Poll ( InstancePtr -> Hdcp1xPtr ) ; } #endif #if ( XPAR_XHDCP22_RX_NUM_INSTANCES > 0 ) if ( InstancePtr -> Hdcp22Ptr ) { Status2 = XHdcp22Rx_Enable ( InstancePtr -> Hdcp22Ptr ) ; } else { Status2 = XST_FAILURE ; } #else Status2 = XST_FAILURE ; #endif break ; default : return XST_FAILURE ; } return ( Status1 == XST_SUCCESS && Status2 == XST_SUCCESS ) ? XST_SUCCESS : XST_FAILURE ; }
This function enables the requested HDCP protocol.
This function enables the requested HDCP protocol .
/* Verify arguments.*/ /* Disable HDCP 1.4 and HDCP 2.2 */ /*  This is needed to ensure that the previous
				 *  command is executed */ /* Enable HDCP 1.4 and disable HDCP 2.2 */ /* This is needed to ensure that the previous
				 * command is executed */ /* Enable HDCP 2.2 and disable HDCP 1.4 */ /* This is needed to ensure that the previous
				 * command is executed. */