cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
2,049 Views
Registered: ‎07-07-2019

Linux Video Pipeline: TPG >>> Video Frame Buffer

I have next Vivado design that includes TPG and Video Framebuffer Write modules. Also attached as file.

BlockDesign.pngClock Wizard clocks: clk_out2=331MHz, clk_out3=100MHz.

The APU configured to run in Linux mode.

The main purpose of the design is capturing video frames from TPG by Linux yavta tool, as described here.

All yavta and v4l2 tools were enabled in petalinux-config rootfs.

 

Linux device tree (DT) video pipeline was defined as next in system-conf.dtsi file:

/include/ "system-conf.dtsi"
/ {
};
&amba_pl {
	v_tpg@b0020000 {
		compatible = "xlnx,v-tpg-7.0";
		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
				xlnx,video-format = <2>;
				xlnx,video-width = <8>;

				tpg_out: endpoint {
					remote-endpoint = <&vcap_tpg_in>;
				};
			};
		};
	};

	vcap_tpg {
		compatible = "xlnx,video";
		dmas = <&v_frmbuf_wr_0 1>;
		dma-names = "port0";

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

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

 

During Linux booting the next messages were printed:

[    3.403821] xilinx-frmbuf b0010000.v_frmbuf_wr: Probe deferred due to GPIO reset defer
[    3.684621] xilinx-video amba_pl@0:vcap_tpg: /amba_pl@0/vcap_tpg/ports/port@0 initialization failed
[    3.693525] xilinx-video amba_pl@0:vcap_tpg: DMA initialization failed
[    4.080409] xilinx-frmbuf b0010000.v_frmbuf_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[    4.090645] xilinx-frmbuf b0010000.v_frmbuf_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!
[    4.099473] xilinx-video amba_pl@0:vcap_tpg: device registered
[    4.105488] xilinx-tpg: probe of b0020000.v_tpg failed with error -16

After Linux is up (attached Linux log file):

/dev/video0 device is appears

/dev/media0 device doesn't appears

 

running media-ctl -p command:

root@IMS1-CPU-PLNX-V02:~# media-ctl -p
Failed to enumerate /dev/media0 (-2)

 

running v4l2-ctl -D command:

root@IMS1-CPU-PLNX-V02:~# v4l2-ctl -D
Driver Info (not using libv4l2):
        Driver name   : xilinx-vipp
        Card type     : vcap_tpg output 0
        Bus info      : platform:vcap_tpg:0
        Driver version: 4.14.0
        Capabilities  : 0x84201000
                Video Capture Multiplanar
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04201000
                Video Capture Multiplanar
                Streaming
                Extended Pix Format

 

running yavta -c10 -f YUYV -s 1920x1080 --skip 7 -F /dev/video0 command stuck the Linux:

root@IMS1-CPU-PLNX-V02:~# yavta -c10 -f YUYV -s 1920x1080 --skip 7 -F /dev/video0
Device /dev/video0 opened.
Device `vcap_tpg output 0' on `platfor[  154.076567] xilinx-video amba_pl@0:vcap_tpg: dma_alloc_coherent of size 0 failed
 :vcap_tpg:0' is a video output (without mplanes) device[. 
 1V54.089555] Unable to handle kernel NULL pointer dereference at virtual address 00000000
deo format set: YUYV (56595559) 1920x1080[  f i1e5l4d. 1a0n2y8,2 ] Mem abort info:
1 planes: 
.* Stride 0, buffer s[i z e1 504
 1V1i0d1e1o7 ]f o rException class = IABT (current EL), IL = 32 bits
mat: YUYV (56595559) 19[2 0 x115048.01 2f0i1e8l1d]  a n yS,E T1   0, FnV = 0
planes: 
 * Stride 0, [b u f1f5e4r. 1s2i6z9e5 20]
   EA = 0, S1PTW = 0
[  154.133376] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc877bd8000
[  154.139893] [0000000000000000] *pgd=000000087210c003, *pud=000000087210c003, *pmd=0000000000000000
[  154.148852] Internal error: Oops: 86000006 [#1] SMP
[  154.153715] Modules linked in: uio_pdrv_genirq
[  154.158153] CPU: 1 PID: 2189 Comm: yavta Not tainted 4.14.0-xilinx-v2018.3 #1
[  154.165276] Hardware name: xlnx,zynqmp (DT)
[  154.169443] task: ffffffc8730fee00 task.stack: ffffff800bea0000
[  154.175346] PC is at 0x0
[  154.177862] LR is at 0x0
[  154.180380] pc : [<0000000000000000>] lr : [<0000000000000000>] pstate: 60000145
[  154.187757] sp : ffffff800bea3bf0
[  154.191056] x29: 0bea3bc000000001 x28: ffffffc872070b00 
[  154.196351] x27: 0000000000000000 x26: ffffffc87b153028 
[  154.201646] x25: 0000000000000000 x24: ffffff8008e6c720 
[  154.206940] x23: 0000000000000008 x22: ffffffc871409c80 
[  154.212235] x21: 00000000ffffffc8 x20: 00000000ffffffc8 
[  154.217530] x19: 08b45500ffffffc8 x18: 0000000000000010 
[  154.222825] x17: 0000007fb1570ef0 x16: ffffff80081afe98 
[  154.228120] x15: ffffffffffffffff x14: ffffff8088ebe227 
[  154.233415] x13: ffffff8008e18aa8 x12: ffffff8008519bd0 
[  154.238710] x11: 0000000005f5e0ff x10: 0000000000000006 
[  154.244004] x9 : 00000000ffffffd0 x8 : 20657a697320666f 
[  154.249299] x7 : 20746e657265686f x6 : 000000000000013e 
[  154.254594] x5 : 0000000000000000 x4 : ffffffbf1d928a9f 
[  154.259889] x3 : ffffffbf1d928aa0 x2 : ffffff800870ce88 
[  154.265184] x1 : 0000000000000001 x0 : 00000000fffffff4 
[  154.270480] Process yavta (pid: 2189, stack limit = 0xffffff800bea0000)
[  154.277076] Call trace:
[  154.279508] Exception stack(0xffffff800bea3ab0 to 0xffffff800bea3bf0)
[  154.285931] 3aa0:                                   00000000fffffff4 0000000000000001
[  154.293744] 3ac0: ffffff800870ce88 ffffffbf1d928aa0 ffffffbf1d928a9f 0000000000000000
[  154.301556] 3ae0: 000000000000013e 20746e657265686f 20657a697320666f 00000000ffffffd0
[  154.309368] 3b00: 0000000000000006 0000000005f5e0ff ffffff8008519bd0 ffffff8008e18aa8
[  154.317180] 3b20: ffffff8088ebe227 ffffffffffffffff ffffff80081afe98 0000007fb1570ef0
[  154.324992] 3b40: 0000000000000010 08b45500ffffffc8 00000000ffffffc8 00000000ffffffc8
[  154.332804] 3b60: ffffffc871409c80 0000000000000008 ffffff8008e6c720 0000000000000000
[  154.340616] 3b80: ffffffc87b153028 0000000000000000 ffffffc872070b00 0bea3bc000000001
[  154.348428] 3ba0: 0000000000000000 ffffff800bea3bf0 0000000000000000 0000000060000145
[  154.356240] 3bc0: 0bea3bc000000001 0000000000000000 0000008000000000 00000000ffffffc8
[  154.364051] 3be0: 0bea3bc000000001 0000000000000000
[  154.368912] [<          (null)>]           (null)
[  154.373602] Code: bad PC value
[  154.376647] ---[ end trace 9d711265d145feb6 ]---

 


I have the next questions:

1. Is /dev/media* device is necessary for frame capturing?

2. That is purpose of /dev/video* and /dev/media* devices?

3. Is this correct to use Video Framebuffer Write or i need to use VDMA IP core?

4. Is the Device Tree Video Pipeline is properly defined? Petalinux device-tree pl.dtsi file also attached as .txt file.

5. What is the meaning of Linux booting fails and messeges described above (related to v_frmbuf_wr, vcap_tpg, v_tpg)?

6. Do i need any additional initalization for DMA (or AXI to DMA) channel?

7. Do i need any additional initialization or setup (in Linux) for TPG? How i know that TPG is running?

 

Thanks,

Kostya

Tags (1)
0 Kudos
15 Replies
Highlighted
Visitor
Visitor
1,979 Views
Registered: ‎07-07-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

I changed my design, according to ZCU102-TRD TPG Video Pipeline (VTC, Video2AXI added).Screenshot from 2019-08-20 16-22-06.png

 

Now vcap_tpg device tree node added by petalinux in pl.dtsi file:

 

v_frmbuf_wr_0: v_frmbuf_wr@b0010000 {
			#dma-cells = <1>;
			clock-names = "ap_clk";
			clocks = <&misc_clk_1>;
			compatible = "xlnx,v-frmbuf-wr-2.1", "xlnx,axi-frmbuf-wr-v2.1";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4>;
			reg = <0x0 0xb0010000 0x0 0x10000>;
			reset-gpios = <&gpio 78 1>;
			xlnx,dma-addr-width = <32>;
			xlnx,dma-align = <8>;
			xlnx,max-height = <1080>;
			xlnx,max-width = <1920>;
			xlnx,pixels-per-clock = <1>;
			xlnx,s-axi-ctrl-addr-width = <0x7>;
			xlnx,s-axi-ctrl-data-width = <0x20>;
			xlnx,vid-formats = "bgr888", "uyvy", "y8", "yuyv";
			xlnx,video-width = <8>;
		};
		misc_clk_1: misc_clk_1 {
			#clock-cells = <0>;
			clock-frequency = <330552250>;
			compatible = "fixed-clock";
		};
		v_tc_0: v_tc@b0040000 {
			clock-names = "clk", "s_axi_aclk";
			clocks = <&clk_wiz_1 0>, <&misc_clk_0>;
			compatible = "xlnx,v-tc-6.1", "xlnx,v-tc-6.1";
			reg = <0x0 0xb0040000 0x0 0x10000>;
			xlnx,generator ;
		};
		v_tpg_0: v_tpg@b0020000 {
			clock-names = "ap_clk";
			clocks = <&misc_clk_1>;
			compatible = "xlnx,v-tpg-8.0", "xlnx,v-tpg-5.0";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 90 4>;
			reg = <0x0 0xb0020000 0x0 0x10000>;
			reset-gpios = <&gpio 78 1>;
			xlnx,s-axi-ctrl-addr-width = <8>;
			xlnx,s-axi-ctrl-data-width = <32>;
			xlnx,vtc = <&v_tc_0>;
			tpg_ports: ports {
				#address-cells = <1>;
				#size-cells = <0>;
				tpg_port0: port@0 {
					/* Fill the field xlnx,video-format based on user requirement */
					reg = <0>;
					xlnx,video-format = <12>;
					xlnx,video-width = <8>;
					tpg_out: endpoint {
						remote-endpoint = <&vcap_dev_in>;
					};
				};
			};
		};
		vcap_tpg {
			compatible = "xlnx,video";
			dma-names = "port0";
			dmas = <&v_frmbuf_wr_0 0>;
			v_ports: ports {
				#address-cells = <1>;
				#size-cells = <0>;
				v_port: port@0 {
					direction = "input";
					reg = <0>;
					vcap_dev_in: endpoint {
						remote-endpoint = <&tpg_out>;
					};
				};
			};
		};

I'm added next to system-conf.dtsi:

 

 

&amba_pl {
	v_tpg@b0020000 {
		xlnx,max-width = <1920>;
		xlnx,max-height = <1080>;
		ports {
			port@0 {
				xlnx,video-format = <0>;
			};
		};
	};

 

 

Now i see during booting:

 

root@IMS1-CPU-PLNX-V03:~# dmesg | grep "v_frmbuf_wr\|vcap_tpg\|v_tc\|v_tpg"  
[    4.342902] xilinx-frmbuf b0010000.v_frmbuf_wr: Probe deferred due to GPIO reset defer
[    4.624090] xilinx-video amba_pl@0:vcap_tpg: /amba_pl@0/vcap_tpg/ports/port@0 initialization failed
[    4.632994] xilinx-video amba_pl@0:vcap_tpg: DMA initialization failed
[    5.036610] xilinx-frmbuf b0010000.v_frmbuf_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[    5.046849] xilinx-frmbuf b0010000.v_frmbuf_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!
[    5.055651] xilinx-video amba_pl@0:vcap_tpg: device registered
[    5.061909] xilinx-vtc b0040000.v_tc: device found, version 6.010
[    5.068221] xilinx-tpg b0020000.v_tpg: device found, version 0.000
[    5.074394] xilinx-video amba_pl@0:vcap_tpg: Entity type for entity b0020000.v_tpg was not initialized!

TPG and vcap_tpg initialized with errors, but VTC and FrameBuffer detected correct ?

 

Next video devices appears:

 

root@IMS1-CPU-PLNX-V03:~# ls /dev | grep "video\|media\|v4l"
media0
v4l
v4l-subdev0
video0

 

Now, a can configure the TPG:

root@IMS1-CPU-PLNX-V03:~# media-ctl -d /dev/media0 --set-v4l '"b0020000.v_tpg":0 [fmt:UYVY/1920x1080]'
root@IMS1-CPU-PLNX-V03:~# media-ctl -d /dev/media0 -p                                                 
Media controller API version 4.14.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial          
bus info        
hw revision     0x0
driver version  4.14.0

Device topology
- entity 1: vcap_tpg output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "b0020000.v_tpg":0 [ENABLED]

- entity 5: b0020000.v_tpg (1 pad, 1 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:UYVY8_1X16/1920x1080 field:none]
                -> "vcap_tpg output 0":0 [ENABLED]

root@IMS1-CPU-PLNX-V03:~# yavta --no-query -w '0x009e0901 45' /dev/v4l-subdev0
Device /dev/v4l-subdev0 opened.
Control 0x009e0901 set to 45, is 45
root@IMS1-CPU-PLNX-V03:~# yavta --no-query -w '0x009e0902 280' /dev/v4l-subdev0
Device /dev/v4l-subdev0 opened.
Control 0x009e0902 set to 280, is 280
root@IMS1-CPU-PLNX-V03:~# yavta --no-query -l /dev/v4l-subdev0
Device /dev/v4l-subdev0 opened.
--- User Controls (class 0x00980001) ---
control 0x0098c901 `Test Pattern: Cross Hairs' min 0 max 1 step 1 default 0 current 0.
control 0x0098c902 `Test Pattern: Moving Box' min 0 max 1 step 1 default 0 current 0.
control 0x0098c903 `Test Pattern: Color Mask' min 0 max 7 step 0 default 0 current 0.
control 0x0098c904 `Test Pattern: Stuck Pixel' min 0 max 1 step 1 default 0 current 0.
control 0x0098c905 `Test Pattern: Noise' min 0 max 1 step 1 default 0 current 0.
control 0x0098c906 `Test Pattern: Motion' min 0 max 1 step 1 default 0 current 0.
control 0x0098c907 `Test Pattern: Motion Speed' min 0 max 255 step 1 default 4 current 4.
control 0x0098c908 `Test Pattern: Cross Hairs Row' min 0 max 4095 step 1 default 100 current 100.
control 0x0098c909 `Test Pattern: Cross Hairs Colum' min 0 max 4095 step 1 default 100 current 100.
control 0x0098c90a `Test Pattern: Zplate Horizontal' min 0 max 65535 step 1 default 30 current 30.
control 0x0098c90b `Test Pattern: Zplate Horizontal' min 0 max 65535 step 1 default 0 current 0.
control 0x0098c90c `Test Pattern: Zplate Vertical S' min 0 max 65535 step 1 default 1 current 1.
control 0x0098c90d `Test Pattern: Zplate Vertical S' min 0 max 65535 step 1 default 0 current 0.
control 0x0098c90e `Test Pattern: Box Size' min 0 max 4095 step 1 default 50 current 50.
control 0x0098c90f `Test Pattern: Box Color(RGB/YCb' min 0 max 16777215 step 1 default 0 current 0.
control 0x0098c910 `Test Pattern: Stuck Pixel thres' min 0 max 65535 step 1 default 0 current 0.
control 0x0098c911 `Test Pattern: Noise Gain' min 0 max 255 step 1 default 0 current 0.
--- Image Source Controls (class 0x009e0001) ---
control 0x009e0901 `Vertical Blanking' min 3 max 8159 step 1 default 100 current 45.
control 0x009e0902 `Horizontal Blanking' min 3 max 8159 step 1 default 100 current 280.
--- Image Processing Controls (class 0x009f0001) ---
control 0x009f0903 `Test Pattern' min 0 max 15 step 1 default 9 current 9.
  1: Horizontal Ramp
  2: Vertical Ramp
  3: Temporal Ramp
  4: Solid Red
  5: Solid Green
  6: Solid Blue
  7: Solid Black
  8: Solid White
  9: Color Bars (*)
  10: Zone Plate
  11: Tartan Color Bars
  12: Cross Hatch
  13: None
  14: Vertical/Horizontal Ramps
  15: Black/White Checker Board
20 controls found.

TPG pixel format still UYVY8_1X16 regardless of that defined by command media-ctl -d /dev/media0 --set-v4l

 

Now, i configure the video interface:

root@IMS1-CPU-PLNX-V03:~# v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat='YUYV'
root@IMS1-CPU-PLNX-V03:~# v4l2-ctl -d /dev/video0 -V
Format Video Capture Multiplanar:
        Width/Height      : 1920/1080
        Pixel Format      : 'YUYV'
        Field             : None
        Number of planes  : 0
        Flags             : 
        Colorspace        : sRGB
        Transfer Function : Default
        YCbCr Encoding    : Default
        Quantization      : Default

Video interface compliance test result:

root@IMS1-CPU-PLNX-V03:~# v4l2-compliance -d /dev/video0
v4l2-compliance SHA   : not available

Driver Info:
        Driver name   : xilinx-vipp
        Card type     : vcap_tpg output 0
        Bus info      : platform:vcap_tpg:0
        Driver version: 4.14.0
        Capabilities  : 0x84201000
                Video Capture Multiplanar
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04201000
                Video Capture Multiplanar
                Streaming
                Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
        test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
        test second video open: OK
        test VIDIOC_QUERYCAP: OK
        test VIDIOC_G/S_PRIORITY: OK
        test for unlimited opens: OK

Debug ioctls:
        test VIDIOC_DBG_G/S_REGISTER: OK
        test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
        test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
        test VIDIOC_ENUMAUDIO: OK (Not Supported)
                fail: ../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-input-output.cpp(420): G_INPUT not supported for a capture device
        test VIDIOC_G/S/ENUMINPUT: FAIL
        test VIDIOC_G/S_AUDIO: OK (Not Supported)
        Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
        test VIDIOC_G/S_MODULATOR: OK (Not Supported)
        test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
        test VIDIOC_ENUMAUDOUT: OK (Not Supported)
        test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
        test VIDIOC_G/S_AUDOUT: OK (Not Supported)
        Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
        test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
        test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
        test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
        test VIDIOC_G/S_EDID: OK (Not Supported)

        Control ioctls:
                test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
                test VIDIOC_QUERYCTRL: OK (Not Supported)
                test VIDIOC_G/S_CTRL: OK (Not Supported)
                test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
                test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
                test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
                Standard Controls: 0 Private Controls: 0

        Format ioctls:
                fail: ../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-formats.cpp(304): Video Capture cap not set, but Video Capture formats defined
                test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
                test VIDIOC_G/S_PARM: OK (Not Supported)
                test VIDIOC_G_FBUF: OK (Not Supported)
                fail: ../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-formats.cpp(432): pix.bytesperline && pix.bytesperline < pix.width
                test VIDIOC_G_FMT: FAIL
                test VIDIOC_TRY_FMT: OK (Not Supported)
                test VIDIOC_S_FMT: OK (Not Supported)
                test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
                test Cropping: OK (Not Supported)
                test Composing: OK (Not Supported)
                test Scaling: OK

        Codec ioctls:
                test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
                test VIDIOC_G_ENC_INDEX: OK (Not Supported)
                test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

        Buffer ioctls:
                test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
                fail: ../../../v4l-utils-1.12.3/utils/v4l2-compliance/v4l2-test-buffers.cpp(571): q.has_expbuf(node)
                test VIDIOC_EXPBUF: FAIL

Test input 0:


Total: 43, Succeeded: 39, Failed: 4, Warnings: 0

How a can debug and fix v4l2-compliance fails?

If i try to capture frames by yavta, it's stuck after buffers mapping:

root@IMS1-CPU-PLNX-V03:~# yavta -n3 -c10 -f YUYV -s 1920x1080 --skip 7 -F /dev/video0
Device /dev/video0 opened.
Device `vcap_tpg output 0' on `platform:vcap_tpg:0' is a video output (without mplanes) device.
Video format set: YUYV (56595559) 1920x1080 field none, 1 planes: 
 * Stride 3840, buffer size 4147200
Video format: YUYV (56595559) 1920x1080 field none, 1 planes: 
 * Stride 3840, buffer size 4147200
3 buffers requested.
length: 1 offset: 3392651552 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0x7fad913000.
length: 1 offset: 3392651552 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0x7fad51e000.
length: 1 offset: 3392651552 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0x7fad129000.

^C
root@IMS1-CPU-PLNX-V03:~# 

Only by killing the prosses (Ctrl+C) i can exit from yavta.

I'm understand that capturing by yavta stuck on receiving frames from source. Therefore, i guess that TPG in not correctly running or initialized.

 

How can i solve this problem and capture frames?

 

 

 

 

 

 

 

 

0 Kudos
Highlighted
Contributor
Contributor
1,692 Views
Registered: ‎05-09-2018

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

any updates?

0 Kudos
Highlighted
Explorer
Explorer
1,537 Views
Registered: ‎02-05-2008

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Any update?

0 Kudos
Highlighted
Visitor
Visitor
1,519 Views
Registered: ‎07-07-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Finally, i found an error.

Slice address (Din_From & Din_Down_To) in Vivado design must be different one from another.

Now i can capture frames by yavta and use vcu (by gstreamer).

I still receive the same errors by running v4l2-compliance check.

Also, i can't change source pixel format (media-ctl -d /dev/media0 --set-v4l '5:0 [fmt:XXXX/1920x1080]' ), it's still the same value UYVY8_1X16

Any suggestion about source pixel format control?

 

0 Kudos
Highlighted
Explorer
Explorer
1,514 Views
Registered: ‎02-05-2008

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Hi,

thanks for the response. Can you share your dts portion. Can you explain Din_From and Din_Down_To?

0 Kudos
Highlighted
Visitor
Visitor
1,491 Views
Registered: ‎07-07-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

 

There is system-user.dtsi addition:

&amba_pl {
	v_tpg@a0040000 {
		compatible = "xlnx,v-tpg-7.0";
		xlnx,max-height = <1080>;
		xlnx,max-width = <1920>;
		xlnx,ppc = <1>;
		ports {
			port@0 {
				xlnx,video-format = <0>;
			};
		};
	};

};

All other dt nodes was build by Petalinux.

 

Regarding Din_From and Din_Down_To.

In Vivado design goto Slice IP "customize block" property and define different  Din_From and Din_Down_To values for each Slice module. These definitions will define defferent reset addresses for tpg/v_frmbuf_wr/vcu/other modules.

Screenshot from 2019-11-07 17-07-26.png

0 Kudos
Highlighted
Mentor
Mentor
1,457 Views
Registered: ‎06-16-2013

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Hi @kostya.an 

 

Would you share the following result ?

 

$ modetest

$ media-ctl -p -d /dev/mediaX

 

Best regards,

 

 

Best regards,

0 Kudos
Highlighted
Visitor
Visitor
1,350 Views
Registered: ‎07-07-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

root@INCL-PE1-XU8:~# modetest
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...failed
trying to open device 'rockchip'...failed
trying to open device 'atmel-hlcdc'...failed
trying to open device 'fsl-dcu-drm'...failed
trying to open device 'vc4'...failed
trying to open device 'virtio_gpu'...failed
trying to open device 'mediatek'...failed
trying to open device 'meson'...failed
trying to open device 'pl111'...failed
no device found
root@INCL-PE1-XU8:~# media-ctl -p -d /dev/media0
Media controller API version 4.14.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial          
bus info        
hw revision     0x0
driver version  4.14.0

Device topology
- entity 1: vcap_tpg output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "a0040000.v_tpg":0 [ENABLED]

- entity 5: a0040000.v_tpg (1 pad, 1 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:UYVY8_1X16/0x0 field:none]
                -> "vcap_tpg output 0":0 [ENABLED]

What are you using the modetest for?

0 Kudos
Highlighted
Mentor
Mentor
1,323 Views
Registered: ‎06-16-2013

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Hi @kostya.an 

 

>What are you using the modetest for?

 

I'd like to clarify my understanding about your issue with using modetest command.

So, I ask you it.

 

>Also, i can't change source pixel format (media-ctl -d /dev/media0 --set-v4l '5:0 [fmt:XXXX/1920x1080]' ), it's still the same value UYVY8_1X16

>Any suggestion about source pixel format control?

 

Would you try the following command ?

 

$ media-ctl -d /dev/media0 -V "\"a0040000.v_tpg\":0 [fmt:<what you want to set>/1920x1080 field:none]"

 

Best regards,

0 Kudos
Highlighted
Visitor
Visitor
1,291 Views
Registered: ‎07-07-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Yes, i tried. Without changes.

root@INCL-PE1-XU8:~# media-ctl -d /dev/media0 --known-mbus-fmts 
RGB444_1X12                     0x1016
RGB444_2X8_PADHI_BE             0x1001
RGB444_2X8_PADHI_LE             0x1002
RGB555_2X8_PADHI_BE             0x1003
RGB555_2X8_PADHI_LE             0x1004
RGB565_1X16                     0x1017
BGR565_2X8_BE                   0x1005
BGR565_2X8_LE                   0x1006
RGB565_2X8_BE                   0x1007
RGB565_2X8_LE                   0x1008
RGB666_1X18                     0x1009
RBG888_1X24                     0x100e
RGB666_1X24_CPADHI              0x1015
RGB666_1X7X3_SPWG               0x1010
BGR888_1X24                     0x1013
GBR888_1X24                     0x1014
RGB888_1X24                     0x100a
RGB888_2X12_BE                  0x100b
RGB888_2X12_LE                  0x100c
RGB888_1X7X4_SPWG               0x1011
RGB888_1X7X4_JEIDA              0x1012
ARGB8888_1X32                   0x100d
RGB888_1X32_PADHI               0x100f
Y8_1X8                          0x2001
UV8_1X8                         0x2015
UYVY8_1_5X8                     0x2002
VYUY8_1_5X8                     0x2003
YUYV8_1_5X8                     0x2004
YVYU8_1_5X8                     0x2005
UYVY8_2X8                       0x2006
VYUY8_2X8                       0x2007
YUYV8_2X8                       0x2008
YVYU8_2X8                       0x2009
Y10_1X10                        0x200a
UYVY10_2X10                     0x2018
VYUY10_2X10                     0x2019
YUYV10_2X10                     0x200b
YVYU10_2X10                     0x200c
Y12_1X12                        0x2013
UYVY12_2X12                     0x201c
VYUY12_2X12                     0x201d
YUYV12_2X12                     0x201e
YVYU12_2X12                     0x201f
UYVY8_1X16                      0x200f
VYUY8_1X16                      0x2010
YUYV8_1X16                      0x2011
YVYU8_1X16                      0x2012
YDYUYDYV8_1X16                  0x2014
UYVY10_1X20                     0x201a
VYUY10_1X20                     0x201b
YUYV10_1X20                     0x200d
YVYU10_1X20                     0x200e
VUY8_1X24                       0x2024
YUV8_1X24                       0x2025
UYVY12_1X24                     0x2020
VYUY12_1X24                     0x2021
YUYV12_1X24                     0x2022
YVYU12_1X24                     0x2023
YUV10_1X30                      0x2016
AYUV8_1X32                      0x2017
SBGGR8_1X8                      0x3001
SGBRG8_1X8                      0x3013
SGRBG8_1X8                      0x3002
SRGGB8_1X8                      0x3014
SBGGR10_ALAW8_1X8               0x3015
SGBRG10_ALAW8_1X8               0x3016
SGRBG10_ALAW8_1X8               0x3017
SRGGB10_ALAW8_1X8               0x3018
SBGGR10_DPCM8_1X8               0x300b
SGBRG10_DPCM8_1X8               0x300c
SGRBG10_DPCM8_1X8               0x3009
SRGGB10_DPCM8_1X8               0x300d
SBGGR10_2X8_PADHI_BE            0x3003
SBGGR10_2X8_PADHI_LE            0x3004
SBGGR10_2X8_PADLO_BE            0x3005
SBGGR10_2X8_PADLO_LE            0x3006
SBGGR10_1X10                    0x3007
SGBRG10_1X10                    0x300e
SGRBG10_1X10                    0x300a
SRGGB10_1X10                    0x300f
SBGGR12_1X12                    0x3008
SGBRG12_1X12                    0x3010
SGRBG12_1X12                    0x3011
SRGGB12_1X12                    0x3012
SBGGR14_1X14                    0x3019
SGBRG14_1X14                    0x301a
SGRBG14_1X14                    0x301b
SRGGB14_1X14                    0x301c
SBGGR16_1X16                    0x301d
SGBRG16_1X16                    0x301e
SGRBG16_1X16                    0x301f
SRGGB16_1X16                    0x3020
JPEG_1X8                        0x4001
S5C_UYVY_JPEG_1X8               0x5001
AHSV8888_1X32                   0x6001
root@INCL-PE1-XU8:~# media-ctl -d /dev/media0 -V "\"a0040000.v_tpg\":0 [fmt:YUYV8_2X8/1920x1080 field:none]"
root@INCL-PE1-XU8:~# media-ctl -d /dev/media0 -p
Media controller API version 4.14.0

Media device information
------------------------
driver          xilinx-video
model           Xilinx Video Composite Device
serial          
bus info        
hw revision     0x0
driver version  4.14.0

Device topology
- entity 1: vcap_tpg output 0 (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "a0040000.v_tpg":0 [ENABLED]

- entity 5: a0040000.v_tpg (1 pad, 1 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Source
                [fmt:UYVY8_1X16/1920x1080 field:none]
                -> "vcap_tpg output 0":0 [ENABLED]
0 Kudos
Observer
Observer
646 Views
Registered: ‎09-28-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Hello,

How did you resolve the error:

xilinx-video amba_pl@0:vcap_tpg: Entity type for entity b0020000.v_tpg was not initialized!

Thanks.

0 Kudos
Highlighted
Explorer
Explorer
628 Views
Registered: ‎02-05-2008

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Hi,

I still get this warning. You can ignore the warning.

0 Kudos
Highlighted
Observer
Observer
602 Views
Registered: ‎09-28-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Does TPG work correctly despite this "warning"?

0 Kudos
Highlighted
Explorer
Explorer
585 Views
Registered: ‎02-05-2008

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

yes

0 Kudos
Highlighted
Observer
Observer
578 Views
Registered: ‎09-28-2019

Re: Linux Video Pipeline: TPG >>> Video Frame Buffer

Okay.

Otherwise, I have an error when opening /dev/video0 with yavta.

yavta -c10 -f YUYV -s 720x576 --skip 7 -F /dev/video0

Device /dev/video0 opened.
Error opening device /dev/video0: neither video capture nor video output supported.

however :

v4l2-ctl -d /dev/video0 --info

Driver Info (not using libv4l2):
Driver name : xilinx-vipp
Card type : video_cap output 0
Bus info : platform:video_cap:0
Driver version: 4.14.0
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format

Any suggestion please?

0 Kudos