Tool/software: Linux
Hi,
My sdk is 4.2 .I 've try to develop dual-camera-demo.
Below is default_parameters in loopback.c I changed:
/* Main camera */ cap0_device.memory_mode = V4L2_MEMORY_DMABUF; cap0_device.num_buffers = NBUF; strcpy(cap0_device.dev_name,"/dev/video5"); strcpy(cap0_device.name,"Capture 0"); cap0_device.buffers = NULL; cap0_device.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; cap0_device.width = 1920; cap0_device.height = 1080; /* PiP camera */ cap1_device.memory_mode = V4L2_MEMORY_DMABUF; cap1_device.num_buffers = NBUF; strcpy(cap1_device.dev_name,"/dev/video1"); strcpy(cap1_device.name,"Capture 1"); cap1_device.buffers = NULL; cap1_device.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; cap1_device.width = 704; cap1_device.height = 288; /* Set the default parameters for device options */ status.main_cam=0; status.num_cams=2;
I got an error with :
ERROR:drm_reserve_plane:632: plane couldn't be reserved
......
ERROR:drm_add_plane_property:547: drm obeject properties for plane type is NULL
If I config
status.num_cams=2;
to
status.num_cams=1;
It will display the camera successfully.
I try to check the plane with modetest -p.There are 4 planes.
I find this error is happen on :
drm_reserve_plane() in loopback.c
if(type_val == DRM_PLANE_TYPE_OVERLAY){
ptr_plane_id[idx++] = plane_id;
}
Only one plane is DRM_PLANE_TYPE_OVERLAY which can be reserved.
Thanks,
Cxy.