From b12d4c057056c79024a6eb69c4fef32bdd930351 Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Thu, 2 Apr 2015 17:54:26 -0700 Subject: [PATCH] dp: rx: mst: Added ability to expose or hide a specific port from the TX. Signed-off-by: Andrei-Liviu Simion --- XilinxProcessorIPLib/drivers/dp/src/xdp.h | 1 + XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.h b/XilinxProcessorIPLib/drivers/dp/src/xdp.h index efd05c5d..f78318d2 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.h @@ -1022,6 +1022,7 @@ void XDp_TxWriteGuid(XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 Guid[4]); void XDp_TxGetGuid(XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, u32 *Guid); +void XDp_RxMstExposePort(XDp *InstancePtr, u8 PortNum, u8 Expose); /* xdp_selftest.c: Self test function. */ u32 XDp_SelfTest(XDp *InstancePtr); diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c index 56dc8014..5ea30e63 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp_mst.c @@ -2295,6 +2295,40 @@ void XDp_TxGetGuid(XDp *InstancePtr, u8 LinkCountTotal, u8 *RelativeAddress, } } +/******************************************************************************/ +/** + * This function allows the user to select which ports will be exposed when + * replying to a LINK_ADDRESS sideband message. The number of ports will also + * be set. + * When an upstream device sends a LINK_ADDRESS sideband message, the RX will + * respond by forming a reply message containing port information for directly + * connected ports. + * If exposed, this information will be provided in the LINK_ADDRESS reply. + * Otherwise, the LINK_ADDRESS reply will not contain this information, hiding + * the port from the TX. + * + * @param InstancePtr is a pointer to the XDp instance. + * @param PortNum is the port number to enable or disable exposure. + * @param Expose will expose the port at the specified PortNum as part of + * the LINK_ADDRESS reply when set to 1. Hidden otherwise. + * + * @return None. + * + * @note None. + * +*******************************************************************************/ +void XDp_RxMstExposePort(XDp *InstancePtr, u8 PortNum, u8 Expose) +{ + InstancePtr->RxInstance.Topology.Ports[PortNum].Exposed = Expose; + + if (Expose) { + InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts++; + } + else if (InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts) { + InstancePtr->RxInstance.Topology.LinkAddressInfo.NumPorts--; + } +} + /******************************************************************************/ /** * This function will check whether or not a DisplayPort device has a global