The CSC IP will look like the following when displayed through media-ctl
entity 7: a0040000.csc (2 pads, 2 links) type V4L2 subdev subtype Unknown flags 0 device node name /dev/v4l-subdev1 pad0: Sink [fmt:RBG24/1280x720 field:none] <- "a0050000.gamma":1 [ENABLED] pad1: Source [fmt:RBG24/1280x720 field:none] -> "a0000000.scalar":0 [ENABLED] |
yavta can be used to modify the control supported by the V4L2 VPSS CSC Driver
root@plnx_aarch64:~# yavta --no-query -l /dev/v4l-subdev1 Device /dev/v4l-subdev1 opened. --- User Controls (class 0x00980001) --- control 0x0098c9a1 `CSC Brightness' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a2 `CSC Contrast' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a3 `CSC Red Gain' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a4 `CSC Green Gain' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a5 `CSC Blue Gain' min 0 max 100 step 1 default 50 current 50. 5 controls found. root@plnx_aarch64:~# yavta --no-query -w '0x0098c9a1 80' /dev/v4l-subdev1 Device /dev/v4l-subdev1 opened. Control 0x0098c9a1 set to 80, is 80 root@plnx_aarch64:~# yavta --no-query -l /dev/v4l-subdev1 Device /dev/v4l-subdev1 opened. --- User Controls (class 0x00980001) --- control 0x0098c9a1 `CSC Brightness' min 0 max 100 step 1 default 50 current 80. control 0x0098c9a2 `CSC Contrast' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a3 `CSC Red Gain' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a4 `CSC Green Gain' min 0 max 100 step 1 default 50 current 50. control 0x0098c9a5 `CSC Blue Gain' min 0 max 100 step 1 default 50 current 50. 5 controls found. |
IP features | 2018.1 to 2018.3 | 2019.1 |
---|---|---|
One, two or four pixel-wide AXI4-Stream video interface | Yes | |
Video resolution support up to UHD at 60 fps | Yes | |
Run-time color space support for RGB, YUV 4:4:4, YUV 4:2:2, YUV 4:2:0 | Yes | |
8, 10, 12, and 16 bits per component support | Driver supports only 8 and 10 bpc formats using only 8 bpc MEDIA BUS formats. | Yes* Driver supports only 8 and 10 bpc formats using 8 and 10 bpc media bus formats |
We need a ZCU102 Rev 1.0 board. Enable TPG, VPSS CSC and Framebuffer Write in kernel defconfig.
The color format set in the TPG is what will propagate to CSC sink pad.
The color format set in the CSC source pad and the one set on video node (Framebuffer Write) in yavta should match.
The device tree also needs to be update. If we are using a 8 bit design then TPG output video-width, VPSS CSC input and output ports video-width should all be 8.
For 10bpc design, the video-width is 10. The video-format for the TPG output port and VPSS CSC input port should match.
/* Use yavta to setup the color bar pattern */ #Set up the TPG output color format to RGB888 media-ctl -v -V '"a3c30000.tpg":0 [fmt:RBG888_1X24/1280x720 field:none]' #Set up the Color Space convertor output to YUV 422 media-ctl -v -V '"a3c40000.csc":1 [fmt:UYVY8_1X16/1280x720 field:none]' #Start capture yavta -n3 -c15 -f YUYV -s1280x720 --skip 14 -F /dev/video0 |
View the captured files in some viewer like yuvplayer.exe.