Using the GC2083 sensor with Duo fails

I bought a MilkV Duo with the CVITEK CV1800B and a GC2083 sensor and connected them as shown here.

I built a new Linux image as described here.

When I try to run camera-test.sh, it fails with:

[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
IOCTL_VB_CMD - vb_ioctl_init NG
system init failed with 0xffffffff
init middleware failed! ret=ffffffff

Is there anything in the buildroot configuration I need to change?
Also, should there be any messages related to GC2083 in the dmesg log?
The file duo-buildroot-sdk/build/boards/cv180x/cv1800b_milkv_duo_sd/cv1800b_milkv_duo_sd_defconfig contains:

CONFIG_SENSOR_GCORE_GC2083=y
1 Like

Problem solved - user error.

I had set ION_SIZE=0, so naturally the initialization was failing with ENOMEM:

openat(AT_FDCWD, "/dev/cvi-base", O_RDWR|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(0xa, 0x3a), ...}) = 0
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0x73, 0x8, 0x10), 0x3fffd1d960) = 0
ioctl(3, _IOC(_IOC_READ|_IOC_WRITE, 0x73, 0x8, 0x10), 0x3fffd1dd00) = -1 ENOMEM (Out of memory)

Retaining the original 26MB value fixes this.

Incidentally, how much memory is needed? I believe that similar 64MB SoC on the market need considerably less memory for their sensors.

1 Like