Toybrick

标题: IMX415支持4K60fps的驱动 [打印本页]

作者: troy    时间: 昨天 11:21
标题: IMX415支持4K60fps的驱动
附件中,驱动添加了4K60fps和1080P60fps的初始化序列,默认设置为4K60fps。
在TB_RK3588_SD0板子内核5.10上验证成功,其他芯片和kernel 6.1内核可以自行参考添加。


测试方法:
1. 执行media-ctl -p  -d /dev/media0 查看media节点的属性(一般是查看media0,如果没看到sensor的节点 ,可以查看其他的media信息)

  1. - entity 63: m00_b_imx415 7-001a (1 pad, 1 link)
  2.              type V4L2 subdev subtype Sensor flags 0
  3.              device node name /dev/v4l-subdev2
  4.         pad0: Source
  5.                 [fmt:SGBRG10_1X10/3864x2192@10000/600000 field:none
  6.                  crop.bounds:(12,16)/3840x2160]
  7.                 -> "rockchip-csi2-dphy0":0 [ENABLED]
复制代码
2. 执行,确认mainpath是哪个video节点,如当前我的环境是/dev/video11。(双mipi口的设备可能会找到两个mainpath可以两个都试一下)
  1. root@sina.comk3588-buildroot:/tmp# grep '' /sys/class/video4linux/video*/name | grep mai
  2. /sys/class/video4linux/video11/name:rkisp_mainpath
复制代码
3. 执行抓图命令,可以看到当前抓图的帧率是60fps了
  1. root@rk3588-buildroot:/tmp# <span style="background-color: rgb(255, 255, 255);">v4l2-ctl -d /dev/video11 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-to=/tmp/IMX415_4K60fps.nv12 --stream-count=1 --stream-skip=120 --stream-poll</span>
  2. [ 1131.309046] stream_cif_mipi_id0: s_power 1, entity use_count 1
  3. [ 1131.341794] rkisp_hw fdcb0000.rkisp: set isp clk = 702000000Hz
  4. [ 1131.344902] rkcif-mipi-lvds2: stream[0] start streaming
  5. [ 1131.345015] rockchip-mipi-csi2 mipi2-csi2: stream on, src_sd: 00000000147e1a9c, sd_name:rockchip-csi2-dphy0
  6. [ 1131.345025] rockchip-mipi-csi2 mipi2-csi2: stream ON
  7. [ 1131.345058] rockchip-csi2-dphy0: dphy0, data_rate_mbps 1782
  8. [ 1131.345101] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:1, dphy0, ret 0
  9. [ 1131.345113] imx415 7-001a: s_stream: 1. 3864x2192, hdr: 0, bpp: 10
  10. [ 1131.345122] imx415 7-001a: write reg array error
  11. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
  12. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
  13. [ 1133.507682] rkcif-mipi-lvds2: stream[0] start stopping, total mode 0x2, cur 0x2
  14. [ 1133.524410] rockchip-mipi-csi2 mipi2-csi2: stream off, src_sd: 00000000147e1a9c, sd_name:rockchip-csi2-dphy0
  15. [ 1133.524504] rockchip-mipi-csi2 mipi2-csi2: stream OFF
  16. [ 1133.524545] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream_stop stream stop, dphy0
  17. [ 1133.524577] rockchip-csi2-dphy csi2-dphy0: csi2_dphy_s_stream stream on:0, dphy0, ret 0
  18. [ 1133.524747] imx415 7-001a: s_stream: 0. 3864x2192, hdr: 0, bpp: 10
  19. [ 1133.525510] rkcif-mipi-lvds2: stream[0] stopping finished, dma_en 0x0

  20. [ 1133.561557] stream_cif_mipi_id0: s_power 0, entity use_count 0
  21. root@rk3588-buildroot:/#
复制代码







欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3