Table of Contents
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.
The driver comes up with default color format on sink pad as MEDIA_BUS_FMT_SRGGB8_1X8 and on source pad as MEDIA_BUS_FMT_RBG888_1X24.
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.
IP / Driver Features
|IP Feature||2018.1 to 2018.3||2019.1 to 2020.2|
|1 / 2 / 4 / 8 pixels per clock support||Yes||Yes|
|8 / 10 / 12 / 16 bits per component||Only 8 bpc supported||8 / 10 / 12 / 16 bpc support|
|Resolutions from 64x64 to 8192x4320||Yes*|
|Supports 4Kp60 in all supported device families||Yes|
|Two interpolation algorithms High resolution and Fringe tolerant||NA for driver|
|Ability to remove horizontal zipper artifacts||NA for driver|
|Use UltraRAM for line buffers||NA for driver|
*Tested for 8192x4320, 3840x2160, 1920x1080, 1280x720
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)
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.
We need a ZCU102 Rev 1.0 board. Enable TPG, Demosaic, Gamma LUT and Framebuffer Write in kernel defconfig.
Modify the demosaic driver as below as TPG output is RGB type and Demosaic requires SRGGB type.
Setup the TPG to generate a pattern. Then run yavta to capture the frame. View this frame in a viewer like yuvplayer.exe
The output looks as follows
Driver has been tested on following boards:
- AR68769 - LogiCORE Sensor Demosaic - Release Notes and Known Issues for the Vivado 2017.3 tool and later versions
- Adds support for 10,12,16 bpc RAW and RGB media bus formats.
- Make max width and height properties mandatory
- 6d7de7c v4l: xilinx-demosaic: Make max width and height properties mandatory
- 899bb51 v4l: xilinx-demosaic: Add support for 10,12,16 bpc RAW and RGB bus formats
- Added xlnx,max-width and xlnx,max-height dt properties
- Added checks to set the correct default and max width and height from dt properties
- 4d0d5f2 v4l: xilinx-demosaic: Correct default values when width, height dt property absent
- 734e627 v4l: xilinx-demosaic: Add check for max width and height
- Remove the redundant output format register
- 6170785 v4l: xilinx-demosaic: Remove Output Video format register
- Initial version added to master branch
- 50dbfdb v4l: xilinx-demosaic: driver support for xilinx video demosaic