Table of Contents

Introduction

The purpose of this page is to describe the Linux V4L2 driver for Xilinx VPSS Color Space Converter (CSC) soft IP. VPSS refers to the Video Processing Sub System.
This driver is for the CSC only mode of operation in the VPSS, please see the Product Guide for more details on its functionality and features.
The Linux VPSS CSC driver (xilinx-vpss-csc.c) based on the V4L2 framework creates a subdev node(/dev/v4l-subdev*) which can be used to configure the VPSS CSC IP core. The VPSS CSC supports changing video properties through V4L Controls like Brightness, Contrast, Red Gain, Blue Gain and Green Gain. The driver is available at https://github.com/Xilinx/linux-xlnx/blob/master/drivers/media/platform/xilinx/xilinx-vpss-csc.c
The VPSS CSC driver supports only the following features are supported including:

IP/Driver Features


IP features2018.1 to 2018.32019.1
One, two or four pixel-wide AXI4-Stream video interfaceYes
Video resolution support up to UHD at 60 fpsYes
Run-time color space support for RGB, YUV 4:4:4, YUV 4:2:2, YUV 4:2:0Yes
8, 10, 12, and 16 bits per component support

Driver supports only 8 and 10 bpc formats

using only 8 bpc MEDIA BUS formats.

Yes* Driver supports only 8 and 10 bpc formats

using 8 and 10 bpc media bus formats


Missing Features / Known Issues / Limitations in Driver


Video Processing Subsystem Release Notes and Known Issues

Kernel Configuration

CONFIG_VIDEO_XILINX_VPSS_CSC and CONFIG_VIDEO_XILINX should be enabled.

Device tree binding

The dts node should be defined with correct hardware configuration. How to define the node is documented here:
https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/media/xilinx/xlnx%2Cv-vpss-csc.txt

Testing Procedure

This driver is a V4L2 sub-device driver, which means it is designed to operate with a video device in it's graph. The driver has been tested with a Xilinx video device (a V4L2 capture device) that is backed by a DMA element (like Framebuffer Write IP). The V4L2 device driver for this IP cannot be tested in isolation by itself. The successful operation of the driver can be tested in two phases :

Successful Creation of a Media Device

media-ctl is a Linux user space utility that can control media entities, it is a part of a larger set of V4L2 tools called v4l-utils
media-ctl allows you to print the topology of your media pipeline and specify input and output pad properties.

Successful Frame Captures

Please see the Test Approach section of the Frame Buffer Write Wiki for more details on how to capture frames.
The Red / Green / Blue gain values can be changed as shown in the Overview section and the captured images can be compared.
Test design

We need a ZCU102 Rev 1.0 board.  Enable TPG, VPSS CSC and Framebuffer Write in kernel defconfig.

The color format set in the TPG is what will propagate to CSC sink pad.

The color format set in the CSC source pad and the one set on video node (Framebuffer Write) in yavta should match.

The device tree also needs to be update. If we are using a 8 bit design then TPG output video-width, VPSS CSC input and output ports video-width should all be 8. 

For 10bpc design, the video-width is 10. The video-format for the TPG output port and VPSS CSC input port should match.


/* Use yavta to setup the color bar pattern */
#Set up the TPG output color format to RGB888
media-ctl -v -V '"a3c30000.tpg":0 [fmt:RBG888_1X24/1280x720 field:none]'
#Set up the Color Space convertor output to YUV 422
media-ctl -v -V '"a3c40000.csc":1 [fmt:UYVY8_1X16/1280x720 field:none]'
#Start capture
yavta -n3 -c15 -f YUYV -s1280x720 --skip 14 -F /dev/video0

View the captured files in some viewer like yuvplayer.exe.

Boards Supported

Driver has been tested on following boards:

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


Related Links