@veye_xumm 好的 一定
Posts made by flaty
-
RE: VEYE imx385 驱动问题+
@veye_xumm V4L2-CTL 如下
Driver Info: Driver name : rkcif Card type : rkcif Bus info : platform:rkcif-mipi-lvds2 Driver version : 5.10.198 Capabilities : 0x84201000 Video Capture Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04201000 Video Capture Multiplanar Streaming Extended Pix Format
修改了代码:
for(int i = 0; i < req_buffer.count; ++i) { struct v4l2_buffer buf; struct v4l2_plane planes[num_planes]; memset(&buf, 0, sizeof(struct v4l2_buffer)); memset(&planes, 0, sizeof(planes)); buf.index = i; buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; buf.memory = V4L2_MEMORY_DMABUF; buf.m.planes = planes; buf.length = 1; buf.bytesused = fmt.fmt.pix.sizeimage; buf.m.planes[0].m.fd = dmabuf_fds[i]; planes[0].bytesused = fmt.fmt.pix.sizeimage; planes[0].m.fd = dmabuf_fds[i]; planes[0].length = fmt.fmt.pix.sizeimage; printf("index: %d\n bytesused: %d fd: %d length: %d\n", buf.index,planes[0].bytesused,planes[0].m.fd ,planes[0].length ); if (0 != ioctl(cam_dev_fd, VIDIOC_QBUF, &buf)) { perror("Unable to queue buffer"); return -1; } }
我打印了信息,如下:
dam申请内存是没问题的
alloc dma_heap buffer. fd: 5, raw_buf: 0x7f7df08000, size: 3110400
alloc dma_heap buffer. fd: 6, raw_buf: 0x7f7dc10000, size: 3110400
alloc dma_heap buffer. fd: 7, raw_buf: 0x7f7d918000, size: 3110400
qbuf第一个缓冲区就报错
index: 0
bytesused: 3110400 fd: 5 length: 3110400
Unable to queue buffer: Invalid argument
我用了3个缓冲,DMA_AALLOC都正确,目前看似乎是这个相机驱动不支持DMA-BUF的模式,您看呢 -
RE: VEYE imx385 驱动问题+
@veye_xumm 我看了 那个源码 内存采用 普通的内存,我希望的是用 drm 或dmaheap 的,这样可以实现零copy
-
RE: VEYE imx385 驱动问题+
@veye_xumm 现在遇到个新的问题,我不知道是板子硬件支持,我是用DMABUF 作为V4L2的qbuf, 但是返回错误 Failed to queue buffer: Invalid argument,您看一下我这部分代码,是不是该驱动支持,
//将缓冲区注册到摄像头
struct v4l2_buffer buf={0};
struct v4l2_plane planes[1]={0};
buf.index =0;
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
buf.memory = V4L2_MEMORY_DMABUF;
buf.length = 1;
buf.m.planes = planes;
planes[0].m.fd = frame_buffers[i].dmabuf_fd;
planes[0].length =buffer_size;if (ioctl(cam_fd, VIDIOC_QBUF, &buf) < 0) { perror("Failed to queue buffer"); return -1; }
-
RE: VEYE imx385 驱动问题+
@veye_xumm
[ 7.047946] veyecam2m 7-003b: veye camera driver version: 00.01.01
[ 7.047980] veyecam2m 7-003b: Failed to get power-gpios, maybe no use
[ 7.048101] veyecam2m 7-003b: supply avdd not found, using dummy regulator
[ 7.048213] veyecam2m 7-003b: supply dovdd not found, using dummy regulator
[ 7.048278] veyecam2m 7-003b: supply dvdd not found, using dummy regulator
[ 7.048303] veyecam2m 7-003b: could not get default pinstate
[ 7.048309] veyecam2m 7-003b: could not get sleep pinstate
[ 7.048320] veyecam2m 7-003b: Success to get veyecam2m endpoint data lanes, dts uses 2 lanes
[ 7.170539] veyecam2m 7-003b: camera id is veyecam2m
[ 7.173503] veyecam2m 7-003b: sensor is IMX385
[ 7.173564] veyecam2m 7-003b: board type is ONE board
[ 7.219705] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m00_b_veyecam2m 7-003b:bus type 5
以上电源的错误,但是ls /dev/video0 可以看到设备了 -
RE: VEYE imx385 驱动问题+
@veye_xumm zhge dsi的头您看 有问题吗 检测不到相机,
#include "roc-rk3588s-pc.dtsi"//#include "rk3588-roc-pc-cam-8ms1m.dtsi"
//open this line to enable fpdlink-III link
//#include "rk3588-roc-pc-fpdlink-90ub954.dtsi"//open this line to enable v-by-one hs link
#include "rk3588-roc-pc-vbyone-overlay.dtsi"#include "rk3588-roc-pc-cam-veyecam2m.dtsi"
#include "rk3588-roc-pc-cam-veyemvcam.dtsi"#include "roc-rk3588s-pc-v10-diff.dtsi"
#define WHICHDSI 0 /* dsi0 = 0,dsi1 = 1*/ -
RE: VEYE imx385 驱动问题+
[0_1756784079945_log.zip](正在上传 100%) 这个是完整的编译log,您看一下,我使用firefly最新的SDK 进行的编译,采用5.10的内核
-
RE: VEYE imx385 驱动问题+
@veye_xumm 编译错误 我把信息发给您看一下,是驱动里面的结构体
CC drivers/media/i2c/veyecam2m.o
drivers/media/i2c/veyecam2m.c: In function 'veyecam2m_g_mbus_config':
drivers/media/i2c/veyecam2m.c:419:24: error: 'V4L2_MBUS_CSI2' undeclared (first use in this function); did you mean 'V4L2_MBUS_CSI1'?
419 | config->type = V4L2_MBUS_CSI2;
| ^~~~~~~~~~~~~~
| V4L2_MBUS_CSI1
drivers/media/i2c/veyecam2m.c:419:24: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/i2c/veyecam2m.c: At top level:
drivers/media/i2c/veyecam2m.c:898:3: error: 'const struct v4l2_subdev_video_ops' has no member named 'g_mbus_config'
898 | .g_mbus_config = veyecam2m_g_mbus_config,
| ^~~~~~~~~~~~~
drivers/media/i2c/veyecam2m.c:898:19: error: initialization of 'int (*)(struct v4l2_subdev *, struct v4l2_subdev_frame_interval )' from incompatible pointer type 'int ()(struct v4l2_subdev *, struct v4l2_mbus_config *)' [-Werror=incompatible-pointer-types]
898 | .g_mbus_config = veyecam2m_g_mbus_config,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/veyecam2m.c:898:19: note: (near initialization for 'veyecam2m_video_ops.s_frame_interval')
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:273:drivers/media/i2c/veyecam2m.o] 错误 1一下是内核配置
============Start building kernel============
TARGET_ARCH =arm64
TARGET_KERNEL_CONFIG =rockchip_linux_defconfig
TARGET_KERNEL_DTS =roc-rk3588s-pc-mipi101-BSD1218-A101KL68
TARGET_KERNEL_CONFIG_FRAGMENT =rk3588_linux.config firefly-linux.config -
VEYE imx385 驱动问题+
VEYE MIPI在 roc3588s-pc的板子,直接刷了 您提供的最新的
好像不太对,我DMESG是 这样,是不是需要我在firefly 重新编译到最新的linux系统里面,这个版本 已经不支持VEYE系列了
parsed
[ 6.876879] veye_vbyone 7-0065: thcv242a_init_pre: begin
[ 6.877028] veye_vbyone 7-0065: Cannot write register 0x50 (-6)!
[ 6.877170] veye_vbyone 7-0065: Cannot write register 0x04 (-6)!
[ 6.877313] veye_vbyone 7-0065: Cannot write register 0x10 (-6)!
[ 6.877455] veye_vbyone 7-0065: Cannot write register 0x1704 (-6)!
[ 6.877597] veye_vbyone 7-0065: Cannot write register 0x102 (-6)!
[ 6.877739] veye_vbyone 7-0065: Cannot write register 0x103 (-6)!
[ 6.877881] veye_vbyone 7-0065: Cannot write register 0x104 (-6)!
[ 6.878023] veye_vbyone 7-0065: Cannot write register 0x105 (-6)!
[ 6.878165] veye_vbyone 7-0065: Cannot write register 0x100 (-6)!
[ 6.878307] veye_vbyone 7-0065: Cannot write register 0x10f (-6)!
[ 6.878453] veye_vbyone 7-0065: Cannot write register 0x10a (-6)!
[ 6.878598] veye_vbyone 7-0065: Cannot write register 0x31 (-6)!
[ 6.878602] veye_vbyone 7-0065: thcv242a_init_pre: successfully
[ 6.878605] veye_vbyone 7-0065: thcv242a_probe: error initializing thcv242a pre
[ 7.040169] mvcam 7-003b: veye mv series camera driver version: 01.01.08 -
RE: IMX385 无法被roc-3588s-pc驱动
@veye_xumm 主要是我们用ubuntu的 时候发现,驱动层其他有问题,,我们算法用起来不行,就用debian的版本,发现可以 就一直用着,然后其他的相机也顺利可以用,没有什么特别的地方,我再看一下 你们提供的驱动和DTB 和Debian的由啥区别,因为我们也买了一个firefly的相机,ISP是xc7160 使用没有问题,你们驱动框架也差不多,我们还有一个FPGA转MIPI的板子,我写的驱动,也能挂载,就是你的这个不可以,我也觉得很神奇
-
RE: IMX385 无法被roc-3588s-pc驱动
@veye_xumm 是同一个,我再 看看吧,我们用这个是 因为UBUNTU适配别的东西有问题,然后其他我们2个相机,驱动都能挂载,,,所以就直接用
-
RE: IMX385 无法被roc-3588s-pc驱动
@veye_xumm 我们用这个目的 就是 firefly适配别的时候有问题,debian没问题,然后测试其他的相机都比较顺利,就到您这个不行了,我看了设备树 还是一个设备树 SDK里面的KERNEL是一样的,文件系统有区别而已。。我再看看先。对了,这个直接接FPGA 可以用吧,这个相机上电就能工作吧。