XilinxProcessorIPLib/drivers/dpdma/src/xdpdma.c
void XDpDma_InitVideoDescriptor(XDpDma_Descriptor *CurrDesc,
				XDpDma_FrameBuffer *FrameBuffer)
{
	Xil_AssertVoid(CurrDesc != NULL);
	Xil_AssertVoid(FrameBuffer != NULL);
	Xil_AssertVoid((FrameBuffer->Stride) % XDPDMA_DESCRIPTOR_ALIGN == 0U);
	u64 DescAddr = (UINTPTR) CurrDesc;
	CurrDesc->Control = XDPDMA_DESC_PREAMBLE | XDPDMA_DESC_IGNR_DONE |
			    XDPDMA_DESC_LAST_FRAME;
	CurrDesc->DSCR_ID = 0;
	CurrDesc->XFER_SIZE = FrameBuffer->Size;
	CurrDesc->LINE_SIZE_STRIDE = ((FrameBuffer->Stride >> 4) <<
				XDPDMA_DESCRIPTOR_LINE_SIZE_STRIDE_SHIFT) |
				(FrameBuffer->LineSize);
	CurrDesc->ADDR_EXT = (((u32)(FrameBuffer->Address >>
				XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH) <<
			       XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT) |
				(UPPER_32_BITS(DescAddr)));
	CurrDesc->NEXT_DESR = LOWER_32_BITS(DescAddr);
	CurrDesc->SRC_ADDR = LOWER_32_BITS(FrameBuffer->Address);
}
/*************************************************************************/
/**
 *
 * This function intializes Video Descriptor for Video and Graphics channel
 *
 * @param    CurrDesc is a pointer to the current Descriptor of Video or
 *	     Graphics Channel.
 * @param    FrameBuffer is a pointer to the Frame Buffer structure
 *
 * @return   None.
 *
 * @note     None.
 *
 * **************************************************************************/
This function intializes Video Descriptor for Video and Graphics channel
@param    CurrDesc is a pointer to the current Descriptor of Video or
Graphics Channel.
@param    FrameBuffer is a pointer to the Frame Buffer structure

@return   None.

@note     None.
This function intializes Video Descriptor for Video and Graphics channel @param CurrDesc is a pointer to the current Descriptor of Video or Graphics Channel . @param FrameBuffer is a pointer to the Frame Buffer structure @return None . @note None .
void XDpDma_InitVideoDescriptor(XDpDma_Descriptor *CurrDesc,
				XDpDma_FrameBuffer *FrameBuffer)
{
	Xil_AssertVoid(CurrDesc != NULL);
	Xil_AssertVoid(FrameBuffer != NULL);
	Xil_AssertVoid((FrameBuffer->Stride) % XDPDMA_DESCRIPTOR_ALIGN == 0U);
	u64 DescAddr = (UINTPTR) CurrDesc;
	CurrDesc->Control = XDPDMA_DESC_PREAMBLE | XDPDMA_DESC_IGNR_DONE |
			    XDPDMA_DESC_LAST_FRAME;
	CurrDesc->DSCR_ID = 0;
	CurrDesc->XFER_SIZE = FrameBuffer->Size;
	CurrDesc->LINE_SIZE_STRIDE = ((FrameBuffer->Stride >> 4) <<
				XDPDMA_DESCRIPTOR_LINE_SIZE_STRIDE_SHIFT) |
				(FrameBuffer->LineSize);
	CurrDesc->ADDR_EXT = (((u32)(FrameBuffer->Address >>
				XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH) <<
			       XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT) |
				(UPPER_32_BITS(DescAddr)));
	CurrDesc->NEXT_DESR = LOWER_32_BITS(DescAddr);
	CurrDesc->SRC_ADDR = LOWER_32_BITS(FrameBuffer->Address);
}
void XDpDma_InitVideoDescriptor ( XDpDma_Descriptor * CurrDesc , XDpDma_FrameBuffer * FrameBuffer ) { Xil_AssertVoid ( CurrDesc != NULL ) ; Xil_AssertVoid ( FrameBuffer != NULL ) ; Xil_AssertVoid ( ( FrameBuffer -> Stride ) % XDPDMA_DESCRIPTOR_ALIGN == 0U ) ; u64 DescAddr = ( UINTPTR ) CurrDesc ; CurrDesc -> Control = XDPDMA_DESC_PREAMBLE | XDPDMA_DESC_IGNR_DONE | XDPDMA_DESC_LAST_FRAME ; CurrDesc -> DSCR_ID = 0 ; CurrDesc -> XFER_SIZE = FrameBuffer -> Size ; CurrDesc -> LINE_SIZE_STRIDE = ( ( FrameBuffer -> Stride >> 4 ) << XDPDMA_DESCRIPTOR_LINE_SIZE_STRIDE_SHIFT ) | ( FrameBuffer -> LineSize ) ; CurrDesc -> ADDR_EXT = ( ( ( u32 ) ( FrameBuffer -> Address >> XDPDMA_DESCRIPTOR_SRC_ADDR_WIDTH ) << XDPDMA_DESCRIPTOR_ADDR_EXT_SRC_ADDR_EXT_SHIFT ) | ( UPPER_32_BITS ( DescAddr ) ) ) ; CurrDesc -> NEXT_DESR = LOWER_32_BITS ( DescAddr ) ; CurrDesc -> SRC_ADDR = LOWER_32_BITS ( FrameBuffer -> Address ) ; }
This function intializes Video Descriptor for Video and Graphics channel
 @param    CurrDesc is a pointer to the current Descriptor of Video or
           Graphics Channel.
This function intializes Video Descriptor for Video and Graphics channel @param CurrDesc is a pointer to the current Descriptor of Video or Graphics Channel .