The purpose of this page is to describe the Linux V4L2 driver for Xilinx Sensor Demosaic soft IP. To understand more details about the
Sensor Demosaic IP please see the Product Guide below.


The Linux V4L2 Demosaic driver is based on the V4L2 framework, and creates a subdev node(/dev/v4l-subdev*) which can be used to configure the Demosaic IP core.
The Xilinx V4L2 Demosaic driver is able to control the Sensor Demosaic Soft IP that can convert a Bayer video stream to RGB video stream.

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-demosaic.c

Linux Kernel defconfig


Device tree binding

The dts node should be defined with correct hardware configuration. How to define the DT node is documented here :
(This path is relative to your Linux kernel source root directory)


  • 12 and 16 color depth is not supported by this driver. Maximum color depth supported by the VPSS CSC soft IP driver is limited to 8-bit and 10-bit in this release
  • Fringe Tolerant Interpolation is not supported. Only High Resolution Interpolation is supported by the driver.

Supported Features

The following table compares the IP features against those supported by the V4L2 driver
Sensor Demosaic (v 1.0) IP Features
Sensor Demosaic V4L2 Driver Support
1. 8-bit color depth
2017.1 Early Acccess
2. Horizontal Zipper Artifact Removal
2017.1 Early Access
3. High Resolution Interpolation
2017.1 Early Access
4. 10-bit color depth
2017.3 Early Access
5. Fringe Tolerant Interpolation
Not Supported

Only the following feature is supported :
  • 8-bit and 10-bit color depth support
  • Converting input Bayer phases(RGGB, GRBG, GBRG, BGGR) into output RGB streaming video (24 bit).
  • Driver will come up with a default media bus format of RGGB on the Sink Pad and a default media bus format of RGB on the Source Pad.
  • The Source Pad (output) media bus format cannot be changed through media-ctl. However, the Sink pad's (input) media bus format can be changed to any Bayer format.

    • entity 16: a0060000.demosaic (2 pads, 2 links)
      type V4L2 subdev subtype Unknown flags 0
      device node name /dev/v4l-subdev4
      pad0: Sink
      [fmt:SRGGB8/1280x720 field:none]
      <- "a3c30000.tpg":0 [ENABLED]
      pad1: Source
      [fmt:RBG24/1280x720 field:none]
      -> "a0050000.gamma":0 [ENABLED]

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 please configure Vivado GUI as follows :

Boards Supported

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

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

Related Links