专栏首页hankZCU106使用VCU TRD的MIPI的例子

ZCU106使用VCU TRD的MIPI的例子

在ZCU106上,使用VCU TRD的MIPI的例子,可以从MIPI摄像头采取图像数据,并使用GStreamer推送到HDMI显示器上。

echo -e "\n\nXilinx CSI2 Rx Subsystem Information: "
dmesg | grep -i "Xilinx CSI2 Rx Subsystem"

# echo -e "\n\nv4l2 Device Information: "
# v4l2-ctl --list-devices

echo -e "\n\nFind Media Pipeline: "
for m in /dev/media* ; do echo $m ; media-ctl -p -d $m | grep -B 3 /dev/video1 ; echo '-----------' ; done

echo -e "\n\nDisplay Media Pipeline Information: "
media-ctl -p -d /dev/media7

echo -e "\n\nFind Controls for MIPI CSI-2 RX: "
yavta -l /dev/v4l-subdev8

echo -e "\n\nUpdate Controls for MIPI CSI-2 RX: "
yavta -w '0x0098c981 4' /dev/v4l-subdev8
yavta -l /dev/v4l-subdev8


echo -e "\n\nUpdate the MIPI CSI-2 Rx Pipeline Formats: "
#SONY IMX274 Sensor
# VCU-TRD 2019.2, \"IMX274\":0
# VCU-TRD 2020.1, \"IMX274 3-001a\"
media-ctl -d /dev/media7 -V "\"IMX274\":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
# VCU-TRD 2020.1, media-ctl -d /dev/media7 -V "\"IMX274 3-001a\":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
#MIPI CSI2-Rx Subsystem
media-ctl -d /dev/media7 -V "\"a00f0000.mipi_csi2_rx_subsystem\":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
media-ctl -d /dev/media7 -V "\"a00f0000.mipi_csi2_rx_subsystem\":1 [fmt:SRGGB8_1X8/1920x1080 field:none]"
#Demosaic IP
media-ctl -d /dev/media7 -V "\"a0250000.v_demosaic\":0 [fmt:SRGGB8_1X8/1920x1080 field:none]"
media-ctl -d /dev/media7 -V "\"a0250000.v_demosaic\":1 [fmt:RBG888_1X24/1920x1080 field:none]"
#Gamma LUT IP
media-ctl -d /dev/media7 -V "\"a0270000.v_gamma_lut\":0 [fmt:RBG888_1X24/1920x1080 field:none]"
media-ctl -d /dev/media7 -V "\"a0270000.v_gamma_lut\":1 [fmt:RBG888_1X24/1920x1080 field:none]"
#VPSS: Color Space Conversion (CSC) Only
media-ctl -d /dev/media7 -V "\"a0240000.v_proc_ss\":0 [fmt:RBG888_1X24/1920x1080 field:none]"
media-ctl -d /dev/media7 -V "\"a0240000.v_proc_ss\":1 [fmt:RBG888_1X24/1920x1080 field:none]"
#VPSS: Scaler Only with CSC
media-ctl -d /dev/media7 -V "\"a0200000.v_proc_ss\":0 [fmt:RBG888_1X24/1920x1080 field:none]"
# VCU-TRD 2019.2, Failed to set VYYUYY8_1X24
# VCU-TRD 2020.1, Success to set VYYUYY8_1X24
media-ctl -d /dev/media7 -V "\"a0200000.v_proc_ss\":1 [fmt:VYYUYY8_1X24/1920x1080 field:none]"

echo -e "\nCheck the MIPI CSI-2 Rx Pipeline Formats: "
media-ctl -p -d /dev/media7


echo -e "\n\nFind Controls for CSC: "
yavta -l /dev/v4l-subdev11

echo -e "\nUpdate CSC Settings to improve colors: "
yavta -w '0x0098c9a1 80' /dev/v4l-subdev11
yavta -w '0x0098c9a2 55' /dev/v4l-subdev11
yavta -w '0x0098c9a3 35' /dev/v4l-subdev11
yavta -w '0x0098c9a4 24' /dev/v4l-subdev11
yavta -w '0x0098c9a5 40' /dev/v4l-subdev11

echo -e "\n\nVerify Controls for CSC: "
yavta -l /dev/v4l-subdev11

echo -e "\nList Video Frames format: "
yavta --enum-formats /dev/video1

echo -e "\nUse Yavta to dump frames: "
yavta -n 3 -c10 -f NV12 -s 1920x1080 --skip 7 -F /dev/video1

echo -e "\nCheck and set HDMI Monitor: "
ls -l /dev/dri/by-path/ | grep mix
modetest -D a0070000.v_mix | grep -C8 Connectors
modetest -D a0070000.v_mix -s 41:1920x1080-30@BG24

echo -e "\nUse GStreamer to send the output to HDIM Tx Subsystem for display on HDMI Monitor: "
gst-launch-1.0 v4l2src device=/dev/video1 \
! video/x-raw, width=1920, height=1080, framerate=60/1 ! queue \
! kmssink bus-id=a0070000.v_mix

echo -e "\nDone."

参考文档

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

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/174719104/Zynq+UltraScale+MPSoC+VCU+TRD+-+Debugging+-+MIPI+CSI-2+Rx+Capture+Pipeline

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 在Linux用户态使用MPSoC AES 加密加速器

    文档Using Cryptography in Zynq UltraScale MPSoC提供了在Linux用户态使用MPSoC AES 加速器的例子。 如果要...

    hankfu
  • Upgrade Zynq-7000 XIP reference design to Xilinx SDK 2018.3

    Xilinx provided reference design Zynq-7000 AP SoC Boot - Booting and Running Wit...

    hankfu
  • 【分享】解决gst-launch-1.0错误“ERROR: Failed to allocate required memory.”

    执行gst-launch-1.0时,得到错误“ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l...

    hankfu
  • 10.YOLO系列及如何训练自己的数据。

    SSD失败之后就挺失望的,而且莫名其妙,于是转向YOLO了,其实object detection领域可选的模型并不多,RCNN系列我是大概看过的,还写过:RCN...

    和蔼的zhxing
  • linux软raid制作记录

    domain0
  • Ubuntu16.04安装Python3

    https://www.python.org/downloads/release/python-370/

    py3study
  • mac电脑进行可见光通信实验要点

    俺踏月色而来
  • mac电脑进行可见光通信实验要点

    俺踏月色而来
  • Linux系统LVM逻辑卷创建过程以及自动化脚本

    最近在上海新建机房的时候,给了我 2 台 M2 机型服务器,在做初始化的时候发现有一堆磁盘: [root@Centos64:~]# fdisk -l | gre...

    张戈
  • nghttp2 - HTTP/2 C Library 简明教程(二)

    程序手艺人

扫码关注云+社区

领取腾讯云代金券