Overview

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

CONFIG_VIDEO_XILINX_DEMOSAIC and CONFIG_VIDEO_XILINX should be enabled.

Device tree binding

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

Limitations

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

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

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.