Mem 2 Mem without any Sub-device device

This Design enable Xilinx Frame buffer read and Frame buffer write works as Mem 2 Mem Device. This design do not have other subdevice so the design just use in pass through mode to copy memory from one place to other. 

Please Note: This design is only compatible with versions 2019.1.

Reference Design

This reference design is with ZCU102

Device tree binding

The dts node should be defined with correct configuration. The common dts properties are described in video.txt

               v_frmbuf_wr_0: v_frmbuf_wr@a0000000 {
                        compatible = "xlnx,axi-frmbuf-wr-v2";
                        #dma-cells = <1>;
                        interrupt-parent = <&gic>;
                        interrupts = <0 89 4>;
                        reg = <0x0 0xa0000000 0x0 0x10000>;
                        reset-gpios = <&gpio 79 1>;
                        xlnx,dma-addr-width = <32>;
                        xlnx,vid-formats = "rgb888", "bgr888", "nv16", "yuyv", "nv12";
                };

                v_frmbuf_rd_0: v_frmbuf_rd@a0010000 {
                        compatible = "xlnx,axi-frmbuf-rd-v2";
                        #dma-cells = <1>;
                        interrupt-parent = <&gic>;
                        interrupts = <0 90 4>;
                        reg = <0x0 0xa0010000 0x0 0x10000>;
                        reset-gpios = <&gpio 78 1>;
                        xlnx,dma-addr-width = <32>;
                        xlnx,vid-formats = "rgb888", "bgr888", "nv16", "yuyv", "nv12";
                };


                video_m2m {
                        compatible = "xlnx,mem2mem";
                        dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>;
                        dma-names = "tx", "rx";
                };

Test Commands: 

Command in passthrough mode 

gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw, width=1920, height=1080, format=RGB ! v4l2video0convert capture-io-mode=4 output-io-mode=4 disable_passthrough=1 ! video/x-raw, width=1920, height=1080, format=RGB ! filesink location=tmp0.rgb