= {under.jpg}
=
Overview
the AXI4-interface.
Location
Xilinx Linux kernel:
https://github.com/Xilinx/linux-xlnx/tree/2017.1_video_eakernel:<tbd>
Supported IP Features
which verification within
within the context 4:2:2, YUV 4:4:4
Memory4:4:4, YUV 4:2:0
Memory Video Format Support: RGB8, BGRX8, RGBX8, YUYV8, YUVX8, RGBX10, YUVX10, Y_UV8, RGB8
ProgrammableY_UV8_420, UYVY8, YUV8, Y_UV10, Y_UV10_420, Y8, Y10
Programmable memory video format
Support
Support for 8-bit or 10-bit per color memory interface
Resolutions up to 3840x2160
Unsupported IP Features
The following list of IP constraints either has no driver support or has not yet been verified to work in any existing technical reference design:
Streaming Video Format Support: YUV 4:2:0
Memory Video Format Support: YUVX8, RGBX10, YUVX10, Y_UV8_420, YUV8, Y_UV10, Y_UV10_420, Y8, Y10
Support for 10-bit per color component on stream or memory interface
Resolutions up to 8192x4320
Known Issues
{kernek_config.png}
Device Tree Configuration
may be found: <linux_root>/Documentation/devicetree/bindings/dma/xilinx/xilinx_frmbuf.txt
found:
<linux_root>/Documentation/devicetree/bindings/dma/xilinx/xilinx_frmbuf.txt
Below is a device tree example for a Framebuffer Write instance configured with
32-bit wide DMA descriptors and support for RGB8 as well as RGBX8 memory
formats:
Example:
v_frmbuf_rd_0: v_frmbuf_rd@80000000 {
reset-gpios = <&gpio 80 1>;
reg = <0x0 0x80000000 0x0 0x10000>;
xlnx,dma-addr-width = <32>;
xlnx,vid-formats = "bgr888","xbgr8888";
};
Implementation Overview
TheInterfacing with the Video Framebuffer Driver from DMA Clients
The Linux driver As such, additional datathe Video Framebuffer driver exports an API interface that must be used by DMA clients in addition to the Linux DMA Engine interface for proper programming. (see <linux_root>/include/linux/dma/xilinx_frmbuf.h).
The general steps for preparing DMA to write to a specific memory buffer:
Using the Video Framebuffer API, configure the DMA device with the expected memory format for write
Prepare an interleaved template describing the buffer location (note: see section DMA Interleaved Template Requirements below for more details)
Pass the interleaved template to the DMA device using the Linux DMA Engine interface
With the DMA descriptor which is passed throughreturned from step 3, add a callback and then submit to the dma engineDMA device via the dma channel object as private data (see <linux_root>/include/linux/dma/xilinx_dma.h).
/*DMA Engine interface
Start the DMA write operation
Terminate DMA write operation when frame processing deemed complete by client
/* Abstract V4L2 Client Code Example */
#ifdef CONFIG_XILINX_FRMBUF
struct xilinx_xdma_config dma_config;
/*Consumed by frmbuf dma driver, if present*/
dma_config.fourccdma_chan *frmbuf_dma = dma->format.pixelformat;
dma_config.typeto_frmbuf_dma_chan(xdev);
struct dma_interleaved_template dma_tmplt;
dma_addr_t addr = XDMA_V4L2;
dma->dma->privatevb2_dma_contig_plane_dma_addr(vb2_buffer_ptr, 0);
u32 flags = &dma_config;
#endif
Technical Reference Designs
Coming soon
Insert your code here.
Related Links
Title 1 & Link 1
Title 1 & LinkDMA_PREP_INTERRUPT | DMA_CTRL_ACK;
/* Step 1– Configure the dma channel to write out packed RGB */
xilinx_xdma_v4l2_config(frmbuf_dma, XVIP_VF_RBG);
/* Step 2 – Describe the buffer attributes for a 1080p frame */
dma_tmplt.dir = DMA_DEV_TO_MEM;
dma_tmplt.src_sgl = false;
dma_tmplt.dst_sgl = true;
dma_tmplt.dst_start = addr;
dma_tmplt.frame_size = 1; /* single plane pixel format */
dma_tmplt.numf = 1080; /* 1920x1080 frame */
dma_tmplt.sgl[0].size = 1080;
dma_tmplt.sgl[0].icg = 0;
/* Step 3 – Submit the buffer description to the dma channel */
desc = dmaengine_prep_interleaved_dma(frmbuf_dma, &dma_tmplt, flags);
desc->callback = dma_complete;
desc->callback_param = buf;
/* Step 4 – Submit the returned and updated descriptor to the dma channel */
dmaengine_submit(desc);
/* Step 5 – Start dma to memory operation */
dma_async_issue_pending(frmbuf_dma);
/* Step 6 – Halt DMA when required frame processing completed */
dmaengine_terminate_all(frmbuf_dma);