The purpose of this page is to describe the Linux V4L2 driver for the UHD SDI Rx Subsystem Soft IP.


The Xilinx UHD SDI Rx Subsystem consists of UHD SDI Rx IP core, an SDI to native video bridge followed by a Native to AXI-4 S bridge. It is capable of detecting the SD, HD, 3GA, 3GB, 6G and 12G (upto 8 data streams) type SDI streams. The maximum resolution it supports is 4096x2160p60 in 12G mode. The SDI Rx IP allows the configuration of the modes to be detected at run time or a fixed mode. It also allows the Framer to be enabled. A video lock event is generated when the incoming SDI mode and transport stream is detected and is stable for a configurable number of video clocks as programmed in the Video Lockout Window. When the input video stream is stopped or the type changed, a video unlock event is generated. The IP gives out the CRC and EDH error status. When the bridges are enabled, then the AXI-4 Stream of YUV 422 10 bit per component and 2 pixels per clock is sent out.


Driver Overview

The SDI Rx Subsystem driver (xilinx-sdirxss.c) is based on the V4L2 framework.
It creates a subdev node(/dev/v4l-subdev*) which can be used to query and configure the UHD SDI Rx Subsystem IP.
The SDI Rx IP would be the first node in the video capture pipeline.
It exposes various V4L controls which can be used to configure the subsystem like auto detection of SDI modes, Framer enable, etc and query the status like CRC status, EDH errors, etc.
It also exposes certain V4L events like video unlock, bridge overflow/underflow, video source change, etc which can be used by application to trigger certain actions.
The general description of V4L2 framework is documented here, v4l2-framework.txt.

HW IP Features

  • Detect SD, HD, 3GA/3GB, 6G, 12G (upto 8 Data Streams)
  • Auto detect multiple modes OR Fixed Mode detection
  • Framer enable/disable
  • Programmable Video Lock Window
  • EDH & CRC error counters
  • Video Lock, Unlock, Bridge Over/UnderFlow interrupts
  • Separate bits to control SDI to Native and Native to AXI4-S bridge
  • ST352 Payload
  • Mode and Transport type detection
    • Fractional / Integral Frame rate
    • Interlaced / Progressive Transport
    • Family detection
  • Output is YUV 422 10 bpc 2 pixels per clock.
  • Standards compliance
    • SMPTE ST 259: SD-SDI at 270 Mb/s.
    • SMPTE RP 165: EDH for SD-SDI.
    • SMPTE ST 292: HD-SDI at 1.485 Gb/s and 1.485/1.001 Gb/s.
    • SMPTE ST 372: Dual Link HD-SDI.
    • SMPTE ST 424: 3G-SDI with data mapped by any ST 425-x mapping at 2.97 Gb/s and 2.97/1.001 Gb/s.
    • SMPTE ST 2081-1: 6G-SDI with data mapped by any ST 2081-x mapping at 5.94 Gb/s and 5.94/1.001 Gb/s.
    • SMPTE ST 2082-1: 12G-SDI with data mapped by any ST 2082-x mapping at 11.88 Gb/s and 11.88/1.001 Gb/s.
    • Dual link and quad link 6G-SDI and 12G-SDI are supported by instantiating two or four UHD-SDI Receiver subsystems.
    • SMPTE ST 352: Payload ID packets are fully supported.

HW IP Configuration

SDI Mode - 3G, 6G, 12G 8DS

Known Issues & Limitations

  • In case of a HD stream without payload, a progressive segmented frame (pSF) will be reported incorrectly as Interlaced as the driver relies on the IP's transport scan locked bit.
  • Multiple instances capability not tested
  • Tested with only 12G 8DS configuration
  • HD 1280x720p24 and HD 1280x720p23.98 - Incorrect colors are captured
  • In some 3GB 1080 modes, the colors in color bars are swapped.
  • Tested with only Phabrix SDI generator.

Kernel Configuration Options for Driver


Device Tree Binding

The dts node should be defined with correct hardware configuration. How to define the node is documented in xlnx,sdirxss.txt

Test Procedure

The driver has been tested using the YAVTA tool.
Certain parameters like Framer enable, Video lockout window, etc can be configured using the YAVTA tool as follows -
For list all the controls and current values
yavta -l /dev/v4l-subdev0
The SDI Rx subsystem locks on to the incoming video stream.
Using VIDIOC_SUBDEV_G_FMT ioctl, the width, height and field type (interlaced or progressive can be determined).
The resolution info can be sent across to video capture application like YAVTA to capture the stream frames into the DDR using a simple design
SDI Rx SS ==> VDMA ==> Memory
For e.g. to capture a 1920x1080 stream the following command is used
yavta -n 3 -c10 -f YUYV -s 1920x1080 --skip 7 -F /dev/video0
The captured frames can then be processed by an application like raw2rgbpnm using a command like
raw2rgbpnm -s1280x720 -f YUYV 1280x720.bin 1280x720.pnm
The .pnm files are then viewed in with a utility called gimp
gimp 1280x720.pnm

Debug capability

The driver debug messages can be enabled by adding "#define DEBUG" at the top of the file.
All debug prints are sent to serial console and can be viewed in kernel dmesg buffer.

Boards Supported

Driver has been tested on the following boards
  1. ZCU106 Rev C

Change log

  • Initial revision released.

Related Links