The purpose of this page is to describe the Linux V4L2 drivers for Xilinx Test Pattern Generator (TPG) and Xilinx Video Timing Controller (VTC) soft IPs.
The Linux TPG driver (xilinx-tpg.c) is based on the V4L2 framework, and creates a subdev node(/dev/v4l-subdev*) which can be used to configure the TPG IP core. If the TPG's video timing interface is enabled and connected to a VTC-Generator, the Linux VTC driver (xilinx-vtc.c) is included as well. The general description of V4L2 framework is documented here.
The following TPG features are supported including:
IP features | 2018.1 to 2018.3 | 2019.1 |
---|---|---|
IP version | 7.0 | 8.0 |
Color bars | Yes | |
Zone plate with adjustable sweep and speed | Yes | |
Temporal and spatial ramps | Yes | |
Moving box with selectable size and color over any available test pattern | Yes | |
RGB, YUV 444, YUV 422, YUV 420 | Yes | |
AXI4-Stream data interfaces | Yes | |
AXI4-Lite control interface | Yes | |
Supports 8, 10, 12, and 16-bits per color component input and output | Supports only 8 bpc media formats | Supports 8 and 10 bpc media bus formats |
Resolutions supported | Max 8192 x 4320, Min 64 x 64 | Max 10328 x 7760, Min 64 x 64** |
Interlaced Video Support | No | Yes in IP. No in driver. |
CONFIG_VIDEO_XILINX_TPG and CONFIG_VIDEO_XILINX should be enabled.
If the TPG's video timing interface is enabled and connected to a VTC-Generator CONFIG_VIDEO_XILINX_VTC should be enabled.
The dts nodes should be defined with correct hardware configuration. How to define the nodes is documented here, xlnx,v-tpg.txt and here, xlnx-v-tc.txt
This has been tested using media-ctl and yavta utilities.
root@zcu102-zynqmp:~# yavta -l /dev/v4l-subdev0 Device /dev/v4l-subdev0 opened. --- User Controls (class 0x00980001) --- control 0x0098c903 `Test Pattern: Color Mask' min 0 max 7 step 0 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 0x0098c912 `Test Pattern: Foreground Patter' min 0 max 2 step 1 default 0 current 0. 0: No Overlay (*) 1: Moving Box 2: Cross Hairs --- Image Source Controls (class 0x009e0001) --- control 0x009e0901 `Vertical Blanking' min 3 max 8159 step 1 default 100 current 100. control 0x009e0902 `Horizontal Blanking' min 3 max 8159 step 1 default 100 current 100. --- Image Processing Controls (class 0x009f0001) --- control 0x009f0903 `Test Pattern' min 0 max 16 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: Color Sweep 14: Vertical/Horizontal Ramps 15: Black/White Checker Board 16: PseudoRandom 14 controls found. Unable to get format: Inappropriate ioctl for device (25). |
973a4f3 v4l: xilinx: tpg: Dynamically modify TPG output format
558c4a1 v4l: xilinx: tpg: Use 10bit media bus codes
f3a6bdc media: xilinx: tpg: Add support for v8.0
14ad60e media: xilinx: tpg: dt pixel per clock validate.
a99e5d9 media: xilinx: vtc: Dynamically calculate pixel clock
a304cdf media: xilinx: tpg: v4l subdevice controls to set fps
868ea3c media: xilinx: tpg: Add pixel per clock dt support
b4c4c7f media: xilinx: Fix "maybe used uninitialized" warning
6fb901b Merge tag 'v4.1' into xilinx/master
ab22e77 [media] media framework: rename pads init function to media_entity_pads_init()
1809510 [media] media: get rid of unused "extra_links" param on media_entity_init()
c89b053 media: xilinx: Fix TPG incorrect pattern on resolution switch
493b602 media: xilinx: Use GPIO to assert TPG reset
3416ea3 media: xilinx: Skip checking bayer phase
507daf8 media: xilinx: Make use of MEDIA_BUS_FMT definitions
aa508c7 media: xilinx: Add "Pseudorandom" pattern support
ba94b83 media: xilinx: Use xvip_write to update background pattern
561392b media: xilinx: Remove HLS based v4l2_ctrl_ops
bd2f3fa media: xilinx: Create menu based control for foreground pattern
852861e media: xilinx: Correct color mask control max value
473f5bc media: xilinx: Fix coding style
c8087d7 media: xilinx: Fix TPG moving box and cross-hair states
993dddf media: xilinx: Set correct HLS color mask range
1559fc0 media: xilinx: Fix TPGv7 controls configuration
cc331d3 [media] v4l: xilinx-tpg: add missing of_node_put
ad33f9c media: xilinx: Integrate TPG v7 support
b8d6a42 media: xilinx: Refactor VTC configuration code
No change
40252c0 xilinx: Remove .owner field for drivers
1995efb media: xilinx: Move and rename xilinx v4l2 controls header file
22d2fcc media: xilinx: tpg: Ignore unconnected input ports
ed9e7cd media: xilinx: tpg: Make horizontal and vertical blanking configurable
b4f6511 media: xilinx: tpg: Disallow switching passthrough mode during streaming
887e5ae media: xilinx: tpg: Default to the color bars test pattern
No change