milkv-duo / duo-buildroot-sdk

Milk-V Duo Official buildroot SDK
411 stars 174 forks source link

Milkv duo camera error Can't acquire VB BLK for VPSS #145

Open wojtess opened 1 month ago

wojtess commented 1 month ago

I have milkv duo with camera(CAM-GC2083). I checked connection to camera and it seems to look fine, camera worked before. I unplugged camera for storage few month ago and today I reconnected it again and pulled new commits from github. What should I check to be sure what is the problem? I have swap enabled:

free -h
              total        used        free      shared  buff/cache   available
Mem:          28.3M       13.8M        4.0M      248.0K       10.4M       11.6M
Swap:        256.0M        1.3M      254.7M

This is how /dev looks like:

ls /dev
bus             cvi_vc_dec1  cvi_vc_enc4  gpiochip3  mmcblk0    spidev1.0
console         cvi_vc_dec2  cvi_vc_enc5  gpiochip4  mmcblk0p1  stderr
cvi-base        cvi_vc_dec3  cvi_vc_enc6  hwrng      mmcblk0p2  stdin
cvi-dwa         cvi_vc_dec4  cvi_vc_enc7  i2c-0      mmcblk0p3  stdout
cvi-mipi-rx     cvi_vc_dec5  cvi_vc_enc8  i2c-1      null       tty
cvi-rgn         cvi_vc_dec6  cvitekaadc   i2c-2      ptmx       ttyS0
cvi-rtos-cmdqu  cvi_vc_dec7  cvitekadac   i2c-3      pts        ttyS1
cvi-sys         cvi_vc_dec8  fd           i2c-4      random     ttyS2
cvi-tpu0        cvi_vc_enc0  full         ion        rfkill     ttyS3
cvi-vi          cvi_vc_enc1  gpiochip0    kmsg       shm        ttyS4
cvi-vpss        cvi_vc_enc2  gpiochip1    log        snd        urandom
cvi_vc_dec0     cvi_vc_enc3  gpiochip2    mem        spidev0.0  zero

This is logs from milkv duo:

[root@milkv-duo]~# camera-test.sh
[SAMPLE_COMM_SNS_ParseIni]-1950: Parse /mnt/data/sensor_cfg.ini
[parse_source_devnum]-1605: devNum =  1
[parse_sensor_name]-1686: sensor =  GCORE_GC2083_MIPI_2M_30FPS_10BIT
[parse_sensor_busid]-1714: bus_id =  1
[parse_sensor_i2caddr]-1725: sns_i2c_addr =  37
[parse_sensor_mipidev]-1736: mipi_dev =  0
[parse_sensor_laneid]-1747: Lane_id =  3, 2, 4, -1, -1
[parse_sensor_pnswap]-1758: pn_swap =  0, 0, 0, 0, 0
MMF Version:7e0cc6a08-musl_riscv64
Create VBPool[0], size: (3110400 * 2) = 6220800 bytes
Create VBPool[1], size: (1382400 * 2) = 2764800 bytes
Create VBPool[2], size: (2764800 * 1) = 2764800 bytes
Total memory of VB pool: 11750400 bytes
Initialize SYS and VB
Initialize VI
ISP Vipipe(0) Allocate pa(0x82fa8000) va(0x0x3fe93fd000) size(291016)
stSnsrMode.u16Width 1920 stSnsrMode.u16Height 1080 25.000000 wdrMode 0 pstSnsObj 0x3fea22d860
[SAMPLE_COMM_VI_StartMIPI]-483: sensor 0 stDevAttr.devno 0
awbInit ver 6.8@2021500
0 R:1400 B:3100 CT:2850
1 R:1500 B:2500 CT:3900
2 R:2300 B:1600 CT:6500
Golden 1024 1024 1024
WB Quadratic:0
isWdr:0
ViPipe:0,===GC2083 1080P 30fps 10bit LINE Init OK!===
********************************************************************************
cvi_bin_isp message
gerritId:      36403          commitId:      c69c5863e      
md5:           cab880835a2ad5184de5ed7762404b84
sensorNum      1              
sensorName0    2083           

PQBIN message
gerritId:      80171          commitId:      5c9d8fc5d      
md5:           ba5a510e093ad42db6788e6c2d13169e
sensorNum      3              
sensorName0    2053           

author:        wanqiang.he    desc:          思博慧CV1812H_GC2083_RGB_mode_V1.0.0
createTime:    2023-08-04 16:48:08version:       V1.1           
tool Version:       v3.0.5.24           mode:      
********************************************************************************
sensorName(0) mismatch, mwSns:2083 != pqBinSns:2053
Cannot open '/dev/cvi-vo': 2, No such file or directory
[SAMPLE_COMM_ISP_Thread]-95: ISP Dev 0 running!
Initialize VPSS
---------VPSS[0]---------
Input size: (1920x1080)
Input format: (19)
VPSS physical device number: 1
Src Frame Rate: -1
Dst Frame Rate: -1
    --------CHN[0]-------
    Output size: (1280x720)
    Depth: 1
    Do normalization: 0
        Src Frame Rate: -1
        Dst Frame Rate: -1
    ----------------------
    --------CHN[1]-------
    Output size: (1280x720)
    Depth: 1
    Do normalization: 0
        Src Frame Rate: -1
        Dst Frame Rate: -1
    ----------------------
------------------------
Bind VI with VPSS Grp(0), Chn(0)
Attach VBPool(0) to VPSS Grp(0) Chn(0)
Attach VBPool(1) to VPSS Grp(0) Chn(1)
Initialize VENC
venc codec: h264
venc frame size: 1280x720
Initialize RTSP
rtsp://127.0.1.1/h264
prio:0
anchor:-8,-8,8,8
anchor:-16,-16,16,16
bbox:bbox_8_Conv_dequant
landmark:kps_8_Conv_dequant
score:score_8_Sigmoid_dequant
anchor:-32,-32,32,32
anchor:-64,-64,64,64
bbox:bbox_16_Conv_dequant
landmark:kps_16_Conv_dequant
score:score_16_Sigmoid_dequant
anchor:-128,-128,128,128
anchor:-256,-256,256,256
bbox:bbox_32_Conv_dequant
landmark:kps_32_Conv_dequant
score:score_32_Sigmoid_dequant
Enter TDL thread
Enter encoder thread
0 R:1165 B:3087 CT:2688
1 R:1464 B:2327 CT:3937
2 R:1974 B:1613 CT:7225
Golden 1464 1024 2327
[  827.882517] vpss_online_qbuf:627(): Grp(0) Chn(1) Can't acquire VB BLK for VPSS
RTSP client connected from: 192.168.42.2
RTSP client disconnected from: 192.168.42.2
[  834.648138] vpss_online_qbuf:627(): Grp(0) Chn(1) Can't acquire VB BLK for VPSS
[  837.247992] vpss_online_qbuf:627(): Grp(0) Chn(1) Can't acquire VB BLK for VPSS

Here is command that I ran in host:

$ ffplay rtsp://192.168.42.1/h264
ffplay version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[h264 @ 0x7f1d4c006280] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f1d4c006280] decode_slice_header error
[h264 @ 0x7f1d4c006280] no frame!
[h264 @ 0x7f1d4c006280] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times
[h264 @ 0x7f1d4c006280] decode_slice_header error
[h264 @ 0x7f1d4c006280] no frame!
[h264 @ 0x7f1d4c006280] non-existing PPS 0 referenced    0B f=0/0   
    Last message repeated 1 times