The purpose of this page is to describe the Linux V4L2 driver for Xilinx VPSS Scaler soft IP. VPSS refers to the Video Processing Sub System.
To understand more about the capabilities of this IP please see the Product Guide (Scaler Only configuration) for VPSS.

Overview

The Linux VPSS Scaler driver (xilinx-vpss-scaler.c) based on the V4L2 framework creates a subdev node(/dev/v4l-subdev*) which can be used to configure the VPSS Scaler IP core. The V4L2 VPSS Scaler driver controls the VPSS Scaler soft IP to achieve upscaling and downscaling of Video and it also provides certain color space conversions.

Linux Kernel Location

The driver is currently located in a special early access branch of the standard Xilinx Linux kernel. See drivers/media/platform/xilinx/xilinx-vpss-scaler.c

Linux Kernel defconfig

CONFIG_VIDEO_XILINX_VPSS_SCALER and CONFIG_VIDEO_XILINX should be enabled.
VPSS_SCALER_Kconfig.jpg



Device Tree Binding

The dts node should be defined with correct hardware configuration. How to define the node is documented here:
Documentation/devicetree/bindings/media/xilinx/xlnx,v-vpss-scaler.txt
(This path is relative to your Linux kernel source root directory)

Limitations

  • Asymmetrical scaler taps are not supported. Horizontal taps must be same as Vertical taps.
  • Colorspace support options are limited to only RGB | YUV 4:4:4 | YUV 4:2:2 | YUV 4:2:0. All other colorspace options are not supported in this release.
  • 12 and 16 bit color depth is not supported by this driver. Maximum color depth supported by the VPSS Scaler soft IP driver is limited to 8-bit and 10-bit in this release.
  • The maximum samples per clock supported by the Linux Driver is 1 and 2 (also called pixels per clock). 4 pixels per clock is not supported.

Supported Features

The following table compares the IP features against those supported by the V4L2 driver:
Scaler Only - VPSS (v 2.0) IP Features
VPSS Scaler V4L2 Driver Support
1. 8-bit color depth
2017.1 Early Access
2. Scaling Algorithm - Polyphase - 8 tap
2017.1 Early Access
3. Enable Color Space Conversion Selected (Enabled)
with Color Space Support for
RGB | YUV 4:4:4 | YUV 4:2:2 | YUV 4:2:0
2017.1 Early Access
(support for YUV 420 media bus format in
2017.3 Early Access)
4. 10-bit color depth
2017.3 Early Access
5. Scaling Algorithm - Bilinear
2017.3 Early Access
6. Scaling Algorithm - Bicubic
2017.3 Early Access
7. Scaling Algorithm - Polyphase
6, 8, 10, and 12 tap
2017.3 Early Access
8. Enable Color Space Conversion Unselected
(Color Space Conversion disabled)
Not Supported
9. Enable Color Space Conversion Selected (Enabled)
with Color Space Support for
RGB | YUV 4:4:4 | YUV 4:2:2
Not Supported
10.Enable Color Space Conversion Selected (Enabled)
with Color Space Support for
RGB | YUV 4:4:4
Not Supported
11. Samples per clock - 1 and 2 (pixels per clock or PPC)
2017.1 Early Access
12. Samples per clock - 4 ( or 4PPC)
Not Supported


The VPSS Scaler driver supports only the following features are supported including:
  • Scaling using bilinear, bicubic and poly-phase (6, 8, 10 and 12 tap) filters that use coefficients programmed by the driver.
  • Color Space Conversion. The following color space conversions have been tested.
  • Scaling Formats that have been tested are as follow :
Sr No.
Video Input Resolution
Video Output Resolution
1.
1280x720
1920x1080
2.
1280x720
3840x2160
3.
3840x2160
1920x1080
Generally arbitrary scaling resolutions are also supported (limited to a maximum of 3840x2160 and a minimum of 224X128).

Vivado IP Configuration

The following snapshots show the Vivado GUI configuration that is supported. All other configurations are not supported in this release.
To get the driver supported version of the IP :
  1. Pick the Scaler Only functionality
  2. Enable Color Space Conversion
  3. Pick RGB | YUV 4:4:4 | YUV 4:2:2 | YUV 4:2:0
vpss-scaler.jpg

4. Pick Bilinear, Bicubic or Polyphase filter for both Horizontal and Vertical Scaler
vpss-scaler-taps.jpg

Boards Supported

Driver has been tested on following boards:
  • ZCU102 Rev 1.0
  • ZCU106 Rev C

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
  • Successful Frame Captures (or writing of buffers by the Frame-buffer Write IP)

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.

Technical Reference Designs

reVision Getting Started

Future Improvements

  • Support to program custom values to the H-scaler and V-scaler coefficients entered by the user.

Related Links