Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    1. Home
    2. flaty
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 30
    • Best 0
    • Groups 0

    flaty

    @flaty

    0
    Reputation
    1
    Profile views
    30
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Email flaty_star@163.com

    flaty Follow

    Latest posts made by flaty

    • RE: VEYE imx385 驱动问题+

      @veye_xumm 好的 一定

      posted in VEYE MIPI camera
      F
      flaty
    • RE: VEYE imx385 驱动问题+

      @veye_xumm 感谢 感谢,,,mmap的方式 已经OK了,我继续去问一下firefly

      posted in VEYE MIPI camera
      F
      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的模式,您看呢

      posted in VEYE MIPI camera
      F
      flaty
    • RE: VEYE imx385 驱动问题+

      @veye_xumm 我看了 那个源码 内存采用 普通的内存,我希望的是用 drm 或dmaheap 的,这样可以实现零copy

      posted in VEYE MIPI camera
      F
      flaty
    • 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;
          }
      posted in VEYE MIPI camera
      F
      flaty
    • RE: VEYE imx385 驱动问题+

      @veye_xumm 测试 出图像了,搞定了 ,谢谢

      posted in VEYE MIPI camera
      F
      flaty
    • 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 可以看到设备了

      posted in VEYE MIPI camera
      F
      flaty
    • RE: VEYE imx385 驱动问题+

      @veye_xumm 我再试一下吧,不知道咋回事,,,编译什么都没问题

      posted in VEYE MIPI camera
      F
      flaty
    • 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*/

      posted in VEYE MIPI camera
      F
      flaty
    • RE: VEYE imx385 驱动问题+

      @veye_xumm dts 参考这个 可以吗?https://github.com/veyeimaging/rk35xx_firefly/tree/main/linux/drivers/rk358x

      posted in VEYE MIPI camera
      F
      flaty