UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
1,508 Views
Registered: ‎02-22-2008

Simple Test Pattern Generator to VDMA generates error in linux

I am working on a camera design using the Zynq ZC702 development kit. I started with the ZC702 TRD, but that wasn't compatible with Vivado 2017.4. So I decided to start from scratch and pull design information from the various TRDs. To start with I created a very simple test pattern generator (TPG) to a VDMA block. The board design is shown below:board_design.PNG

 

I used the latest (as of 02/22/2018) device tree generator here (https://github.com/Xilinx/device-tree-xlnx) to generate the initial dts files. I then hand tweaked the DTS files for my project, see below:

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Mon Feb 19 11:33:18 2018
 */

&amba {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		axi_gpio_0: gpio@41200000 {
			#gpio-cells = <2>;
			compatible = "xlnx,xps-gpio-1.00.a";
			gpio-controller ;
			reg = <0x41200000 0x10000>;
			xlnx,all-inputs = <0x1>;
			xlnx,all-inputs-2 = <0x0>;
			xlnx,all-outputs = <0x0>;
			xlnx,all-outputs-2 = <0x0>;
			xlnx,dout-default = <0x00000000>;
			xlnx,dout-default-2 = <0x00000000>;
			xlnx,gpio-width = <0x2>;
			xlnx,gpio2-width = <0x20>;
			xlnx,interrupt-present = <0x0>;
			xlnx,is-dual = <0x0>;
			xlnx,tri-default = <0xFFFFFFFF>;
			xlnx,tri-default-2 = <0xFFFFFFFF>;
		};
		axi_vdma_0: dma@43000000 {
			#dma-cells = <1>;
			clock-names = "s_axi_lite_aclk", "m_axi_s2mm_aclk", "m_axi_s2mm_aclk";
			clocks = <&clkc 15>, <&clkc 15>, <&clkc 15>;
			compatible = "xlnx,axi-vdma-1.00.a";
			interrupt-parent = <&intc>;
			interrupts = <0 30 4>;
			reg = <0x43000000 0x10000>;
			xlnx,addrwidth = <0x20>;
			xlnx,flush-fsync = <0x1>;
			xlnx,num-fstores = <0x3>;
			xlnx,vid-formats = "yuyv", "uyvy", "y8";
			dma-channel@43000030 {
				compatible = "xlnx,axi-vdma-s2mm-channel";
				interrupts = <0 30 4>;
				xlnx,datawidth = <0x18>;
				xlnx,device-id = <0x0>;
				xlnx,genlock-mode ;
			};
		};
		v_tpg_0: v_tpg@43c00000 {
			compatible = "xlnx,v-tpg-7.0";
			interrupt-parent = <&intc>;
			interrupts = <0 29 4>;
			reg = <0x43c00000 0x10000>;
			xlnx,s-axi-ctrl-addr-width = <0x8>;
			xlnx,s-axi-ctrl-data-width = <0x20>;
			clocks = <&clkc 15>;
			reset-gpios = <&gpio0 9 1>;

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;

					xlnx,video-format = <0>;
					xlnx,video-width = <8>;

					tpg_out: endpoint {
						remote-endpoint = <&vcap_tpg_in>;
					};
				};
			};			
		};
 		vcap_tpg {
            compatible = "xlnx,video";
            dmas = <&axi_vdma_0 0>;
            dma-names = "port0";

            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    direction = "input";
                    vcap_tpg_in: endpoint {
                        remote-endpoint = <&tpg_out>;
                    };
                };
            };
        };
	};
};

I have a script that runs the DTC compiler. When I run dtc it generates the following warnings. It seems they are trying to tell me something, but I've read through every txt file in the kernel's Documentation/devicetree/bindings/media/xilinx and compared two different TRD design DTSI files. So I "think" I have the right information.

Build DTB file
~/projects/maza/software/scripts ~/projects/maza/software/scripts
maza_sd.dtb: Warning (unit_address_vs_reg): Node /amba/amba_pl/dma@43000000/dma-channel@43000030 has a unit name, but no reg property
maza_sd.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
maza_sd.dtb: Warning (simple_bus_reg): Node /amba/amba_pl/vcap_tpg missing or empty reg/ranges property
maza_fs.dtb: Warning (unit_address_vs_reg): Node /amba/amba_pl/dma@43000000/dma-channel@43000030 has a unit name, but no reg property
maza_fs.dtb: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
maza_fs.dtb: Warning (simple_bus_reg): Node /amba/amba_pl/vcap_tpg missing or empty reg/ranges property

 

The kernel spits out the following error message on bootup:

xilinx-vdma 43000000.dma: Xilinx AXI VDMA Engine Driver Probed!!
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 27, base_baud = 3125000) is a xuartps
console [ttyPS0] enabled
[drm] Initialized
brd: module loaded
loop: module loaded
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 29 (00:0a:35:00:01:22)
Marvell 88E1116R e000b000.etherne:07: attached PHY driver [Marvell 88E1116R] (mii_bus:phy_addr=e000b000.etherne:07, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 24
xilinx-video amba:amba_pl:vcap_tpg: device registered
xilinx-tpg 43c00000.v_tpg: device found, version 0.000
xilinx-video amba:amba_pl:vcap_tpg: Entity type for entity 43c00000.v_tpg was not initialized!
OF: ERROR: Bad of_node_put() on /amba/amba_pl/v_tpg@43c00000/ports/port@0/endpoint
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-xilinx #1
Hardware name: Xilinx Zynq Platform
[<c010e1c4>] (unwind_backtrace) from [<c010a424>] (show_stack+0x10/0x14)
[<c010a424>] (show_stack) from [<c02dc0b0>] (dump_stack+0x80/0x9c)
[<c02dc0b0>] (dump_stack) from [<c02ddd74>] (kobject_put+0x88/0x9c)
[<c02ddd74>] (kobject_put) from [<c0494c10>] (xvip_graph_notify_complete+0x17c/0x3c8)
[<c0494c10>] (xvip_graph_notify_complete) from [<c048b918>] (v4l2_async_register_subdev+0x9c/0xc4)
[<c048b918>] (v4l2_async_register_subdev) from [<c04987e0>] (xtpg_probe+0x5a0/0x61c)
[<c04987e0>] (xtpg_probe) from [<c039bec0>] (platform_drv_probe+0x50/0x9c)
[<c039bec0>] (platform_drv_probe) from [<c039a95c>] (driver_probe_device+0x1b0/0x274)
[<c039a95c>] (driver_probe_device) from [<c039aa9c>] (__driver_attach+0x7c/0xa8)
[<c039aa9c>] (__driver_attach) from [<c03991cc>] (bus_for_each_dev+0x7c/0x8c)
[<c03991cc>] (bus_for_each_dev) from [<c039a0bc>] (bus_add_driver+0x16c/0x1dc)
[<c039a0bc>] (bus_add_driver) from [<c039b1b8>] (driver_register+0xa0/0xe0)
[<c039b1b8>] (driver_register) from [<c01017b4>] (do_one_initcall+0x100/0x120)
[<c01017b4>] (do_one_initcall) from [<c0900da4>] (kernel_init_freeable+0x190/0x1d8)
[<c0900da4>] (kernel_init_freeable) from [<c06010b0>] (kernel_init+0x8/0x10c)
[<c06010b0>] (kernel_init) from [<c0106c98>] (ret_from_fork+0x14/0x3c)

You can see the Xilinx AXI VDMA engine is probed. Then it registers the vcap_tpg fails to initialize. This is very similar to the ZCU102 TRD design, the main difference is that they use a frame buffer instead of a VDMA object. 

 

Thanks in advance.

 

 

 

Tags (3)
0 Kudos
6 Replies
Highlighted
Observer chenhao_7
Observer
1,339 Views
Registered: ‎12-11-2017

Re: Simple Test Pattern Generator to VDMA generates error in linux

Apply this patch and try again. I found this in the Petalinux config files from Xilinx's ZC702 TRD 2017.2.

0 Kudos
Visitor lh123lh
Visitor
727 Views
Registered: ‎11-21-2018

Re: Simple Test Pattern Generator to VDMA generates error in linux

I have the same problem("xilinx-video amba:test_cap: Entity type for entity 43c00000.v_tpg was not initialized!"),how can i solve this problem?

0 Kudos
Explorer
Explorer
705 Views
Registered: ‎10-21-2015

Re: Simple Test Pattern Generator to VDMA generates error in linux

Hi

As of version 2018.2, tpg seems to require vtc.

 https://github.com/Xilinx/linux-xlnx/blob/xilinx-v2018.2/drivers/media/platform/xilinx/xilinx-tpg.c  line 990-994

Refer to ZynqMP TRD about tpg with vtc

0 Kudos
Observer chenhao_7
Observer
690 Views
Registered: ‎12-11-2017

Re: Simple Test Pattern Generator to VDMA generates error in linux

My project works well. However, that error message still shows. It complains about "Entity type was not initialized" instead of "Device was not initialized". So I guess it has no impact on the normal function of TPG.

0 Kudos
Visitor lh123lh
Visitor
660 Views
Registered: ‎11-21-2018

Re: Simple Test Pattern Generator to VDMA generates error in linux

Hi,can you capture the pictures via the /dev/video* node?
0 Kudos
Explorer
Explorer
589 Views
Registered: ‎10-21-2015

Re: Simple Test Pattern Generator to VDMA generates error in linux

0 Kudos