Table of Contents

Introduction

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/Driver Features

IP features2018.1 to 2018.32019.1
IP version7.08.0
Color barsYes
Zone plate with adjustable sweep and speedYes
Temporal and spatial rampsYes
Moving box with selectable size and color over any available test patternYes
RGB, YUV 444, YUV 422, YUV 420Yes
AXI4-Stream data interfacesYes
AXI4-Lite control interfaceYes
Supports 8, 10, 12, and 16-bits per color component input and outputSupports only 8 bpc media formatsSupports 8 and 10 bpc media bus formats
Resolutions supported Max 8192 x 4320, Min 64 x 64Max 10328 x 7760, Min 64 x 64**
Interlaced Video SupportNoYes in IP. No in driver.

Missing Features / Know limitations / Issues in Driver

Kernel Configuration

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.

Device Tree Binding

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

Test Procedure

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).


Known Issues

Change log

2021.2

2021.1

2020.2

2020.1

2019.2

2019.1

2018.3

2018.2

2018.1

2017.4

2017.3

2017.2

2017.1

2016.4

2016.3

2016.2

2016.1

2015.4

2015.3

2015.2

2015.1

2014.4

No change

2014.3

2014.2

No change

2014.1

2013.4

Related Links