Zynq UltraScale+ MPSoC VCU TRD - Debugging - MIPI CSI-2 Rx Capture Pipeline

The VCU TRD has a MIPI CSI-2 Rx capture pipeline. The following are some tips on how to debug the MIPI CSI-2 Rx pipeline configuration.  They walks through how to find the settings, adjust them and then send the output to the HDMI Tx Display Pipeline, or capture and dump out some frames to disk, using YAVTA.

This was tested on the Zynq UltraScale+ MPSoC VCU TRD 2018.3, but the same steps should apply other versions of the Zynq UltraScale+ MPSoC VCU TRD, as well as to other platforms which have a similar pipeline, like the Zynq UltraScale+ MPSoC Base TRD 2018.3.


Table of Contents


How to find the MIPI CSI-2 Rx Capture Pipeline

Find if the driver was loaded:

Look at the DMESG output for the Xilinx CSI2 Rx Subsystem to find out if the driver was loaded and the assoicated address.

Find Device ID:

List the devices and find that the MIPI CSI input is /dev/video1.

Find Media Pipeline

To find the assoicated Media device you can use either of the following methods

  • Look at the devfs
  • Look through the media devices and to find which media device contains the MIPI CSI RX (/dev/video1)

Display Media Pipeline

You can use media-ctl to list out the structure of the pipeline and you will find that it looks like this:

  • MIPI CSI2 Rx -> Demosaic -> Gamma LUT -> VPSS CSC -> VPSS Scaler -> Video Frame Buffer Write IP


How to Configure the MIPI CSI-2 RX Pipeline

Find Controls for MIPI CSI-2 RX (/dev/v4l-subdev8)

Update the MIPI CSI-2 Rx IP

For the Sony IMX274 we need to configure the number of Active lanes to 4

We can change the lane settings with Yavta using the address information gathered above.

Then use Yavta to verify that the lane setting was updated to 4,

Update the MIPI CSI-2 Rx Pipeline Formats

Use media-ctl to configure the MIPI Pipeline color formats:
NOTE:  In 2019.1 you may need to use xmedia-ctl.

Use media-ctl to check if the settings were updated.

Update Color Space Conversion

Use yavta to update the Color Space Conversion for better colors from the SONY IMX274 Sensor.  This must be done after the color formats are setup or the CSC values will be reset when setting up the format.

Verify that MIPI CSI2-Rx Pipeline is working:

MIPI to HDMI Tx using GStreamer

Use GStreamer to send the output to HDIM Tx Subsystem for display on HDMI Monitor.

Dump Frames using Yavta

Use Yavta list the supported formats before capturing:

Use Yavta to dump frames.

You will receive 3 output frames that can be viewed using your favorite YUV Viewer.

Modify the Pipeline to support RGB

After you are sure that the pipeline is working you can then change the output to RGB.

Use media-ctl to change the output type of the Video Scaler with Color Space Conversion.

Use media-ctl to check if the settings were updated.

MIPI to HDMI Tx using GStreamer

Because the output pipeline does not support RGB input, you can not use GStreamer to output to HDIM Tx Subsystem for display on HDMI Monitor.  You would need to modify the PL design to accept RGB input.
NOTE: It really depends on what format planes were supported by the Video Mixer IP in the design.  You can always use modetest to find the full list of supported formats for the output.

Dump Frames using Yavta

Use Yavta list the supported formats before capturing:

Use Yavta to dump frames.

You will receive 3 output frames that can be viewed using your favorite RGB Viewer.


Appendix:

List Supported Formats:

You can also use v4l2-ctl to list the supported formats.  These will change when the IP is reconfigured.

When configured for VYYUYY8 Pixel Format:

When configured for RBG888 format:

Related Links