RK3566 + RK628D驱动板使用问题
RK3566提供的系统镜像Ubuntu有2个,他们之间有什么区别?我要使用RK3566 + RK628D驱动板,烧写哪个系统合适?有没有已经集成了驱动的系统镜像。我看网上RK628D的驱动教程里面,是用了几个IO口去做控制的,但是这个驱动板只有一个MIPI CSI接口和开发板连接,那么其他的控制IO呢?谢谢
本来就有i2c和reset等脚位,可以确认一下驱动是否有加 ROC-RK3566-PC + RK628D转接板;
我分别测试了2个固件;ROC-RK3566-PC Android11.0 固件,这个固件测试628是没有问题的;
这个固件:ROC-RK3566-PC Ubuntu20.04 固件,测试后有问题;
内核相关日志看起来没有问题,但是/dev列表下是没有识别到对应的video设备,只有系统默认的video0~video4;
日志如下:
启动之前插入hdmi和628;启动日志中的相关部分:
[ 1.462895] vdd_cpu: override max_uV, 1390000 -> 1387500
[ 1.628219] vccio_sd: ramp_delay not set
[ 2.060373] rk628-csi-v4l2 4-0050: RK628 I2C driver version: 00.00.08
[ 2.103729] rk628-csi-v4l2 4-0050: RK628 MCU + I2C Mode
[ 2.107401] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m00_b_rk628-csi 4-0050:bus type 4
[ 2.249720] m00_b_rk628-csi 4-0050: rk628-csi-v4l2 found @ 0xa0 (rk3x-i2c)
[ 2.273628] cfg80211: failed to load regulatory.db
[ 3.299146] rk628-csi-v4l2 4-0050: clock detected!
[ 3.299481] rk628-csi-v4l2 4-0050: clk det over cnt:0, reg_0x6654:0x801000a1
[ 3.303370] rk628-csi-v4l2 4-0050: clock stable!
[ 3.303715] rk628-csi-v4l2 4-0050: cdr_mode:16, cdr_data:161
[ 3.304239] rk628-csi-v4l2 4-0050: cdr_mode:16, pll_man:0x7a108
[ 3.309535] rk628-csi-v4l2 4-0050: cdr_mode:16, dc_gain:1, rd_offset:0, edge:0x2d5190
[ 3.361199] rk628-csi-v4l2 4-0050: channel:0, round:0, max_zero_cnt:2193, max_val:0x33f9b7
[ 3.366802] rk628-csi-v4l2 4-0050: channel:1, round:0, max_zero_cnt:2069, max_val:0x287a2b
[ 3.372298] rk628-csi-v4l2 4-0050: channel:2, round:0, max_zero_cnt:2400, max_val:0x34add9
[ 3.421710] rk628-csi-v4l2 4-0050: channel:0, round:1, max_zero_cnt:2189, max_val:0x2c2b1b
[ 3.428172] rk628-csi-v4l2 4-0050: channel:1, round:1, max_zero_cnt:2000, max_val:0x412c43
[ 3.434362] rk628-csi-v4l2 4-0050: channel:2, round:1, max_zero_cnt:2400, max_val:0x2ec879
[ 3.483349] rk628-csi-v4l2 4-0050: channel:0, round:2, max_zero_cnt:2000, max_val:0x344f2f
[ 3.489077] rk628-csi-v4l2 4-0050: channel:1, round:2, max_zero_cnt:2076, max_val:0x3c7df0
[ 3.495201] rk628-csi-v4l2 4-0050: channel:2, round:2, max_zero_cnt:2400, max_val:0x38c3b0
[ 3.543779] rk628-csi-v4l2 4-0050: channel:0, round:3, max_zero_cnt:2000, max_val:0x729cf1
[ 3.549542] rk628-csi-v4l2 4-0050: channel:1, round:3, max_zero_cnt:2000, max_val:0x54bbbd
[ 3.555472] rk628-csi-v4l2 4-0050: channel:2, round:3, max_zero_cnt:2000, max_val:0x621dfe
[ 3.604291] rk628-csi-v4l2 4-0050: channel:0, round:4, max_zero_cnt:2000, max_val:0x5e01f5
[ 3.609871] rk628-csi-v4l2 4-0050: channel:1, round:4, max_zero_cnt:1998, max_val:0x405f18
[ 3.615382] rk628-csi-v4l2 4-0050: channel:2, round:4, max_zero_cnt:2000, max_val:0x6e5505
[ 3.664200] rk628-csi-v4l2 4-0050: channel:0, round:5, max_zero_cnt:2163, max_val:0x4e061c
[ 3.669838] rk628-csi-v4l2 4-0050: channel:1, round:5, max_zero_cnt:2000, max_val:0x453f74
[ 3.675121] rk628-csi-v4l2 4-0050: channel:2, round:5, max_zero_cnt:2127, max_val:0x5b6087
[ 3.675181] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:0, rd:0
[ 3.675191] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:1, rd:2
[ 3.675199] rk628-csi-v4l2 4-0050: rk628_combrxphy_chose_round_for_ch channel:2, rd:2
[ 3.675207] rk628-csi-v4l2 4-0050: last equ gain ch0:0, ch1:2, ch2:2
[ 3.892473] rk628-csi-v4l2 4-0050: channel alignment done
[ 3.892546] rk628-csi-v4l2 4-0050: rx initial done
[ 4.009497] m00_b_rk628-csi 4-0050: rk628_csi_format_change: New format: 1920x1080p60.0 (2200x1125) log看起来是正常的,默认的节点就是/dev/video0,使用有什么问题吗,您是如何验证有问题的,我这边按照wiki的脚本,验证是ok的
https://wiki.t-firefly.com/HDMI-TO-MIPI-CSI-RK628D/rk628d.html#er-shi-yong-fang-fa 谢谢,是我之前一个参数没有配置对,我发现是可以读取了,不过有个问题;
参数 video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 , 30fps是没有问题的,可以正常处理;
video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ,60fps就直接报错了,
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
看起来是数据源的问题,跟628模块有关。628模块的参数是支持1080P@60fps的。但是我测试的结果来看是有问题的。 测试60fps 可以使用下面的命令
GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
plane-id和connector-id可以通过如下 命令获取
cat /sys/kernel/debug/dri/0/state | grep "connector\["
connector: Writeback-1
connector: HDMI-A-1
cat /sys/kernel/debug/dri/0/state | grep "Esmart"
plane: Esmart0-win0
本帖最后由 czg516 于 2024-8-21 23:16 编辑
luwy 发表于 2024-8-20 10:12
测试60fps 可以使用下面的命令
plane-id和connector-id可以通过如下 命令获取
按照您的方法,还是不能正常设置,不能测试60fps,错误信息如下:
root@firefly:~# GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
Setting pipeline to PAUSED ...
0:00:00.1146405334685 0x5597c946d0 DEBUG fpsdisplaysink fpsdisplaysink.c:440:fps_display_sink_start:<fpsdisplaysink0> Use text-overlay? 0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
gstkmssink.c(1087): gst_kms_sink_start (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
Setting pipeline to NULL ...
Freeing pipeline ...
root@firefly:~#
你的plane-id和connector-id 有没有设置对 luwy 发表于 2024-8-22 10:03
你的plane-id和connector-id 有没有设置对
root@firefly:/userdata# cat /sys/kernel/debug/dri/0/state | grep "connector\["
connector: Writeback-1
connector: HDMI-A-1
root@firefly:/userdata# cat /sys/kernel/debug/dri/0/state | grep "Esmart"
plane: Esmart0-win0
root@firefly:/userdata# GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080 ! queue ! fpsdisplaysink video-sink="kmssink plane-id=73 connector-id=108" sync=false text-overlay=false
Setting pipeline to PAUSED ...
0:00:00.1111515716292 0x556fa40cd0 DEBUG fpsdisplaysink fpsdisplaysink.c:440:fps_display_sink_start:<fpsdisplaysink0> Use text-overlay? 0
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: Could not get allowed GstCaps of device
Additional debug info:
gstkmssink.c(1087): gst_kms_sink_start (): /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0:
driver does not provide mode settings configuration
Setting pipeline to NULL ...
Freeing pipeline ...
root@firefly:/userdata#
按照您给的操作,检查了,两个ID都是正确的 luwy 发表于 2024-8-22 10:03
你的plane-id和connector-id 有没有设置对
我的需求是这样,通过RK628D接入HDMI的视频源,然后对视频源进行录像,分辨率1920*1080,帧率是30的时候没有问题,可以录制。但是当帧率设置为60的时候,会报错如下:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.003095870
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
页:
[1]
2