Hello,
I am currently trying to use a USB camera with the RZ/V2L Evaluation Board Kit. I added the OpenCV Accelerator to Weston for Rz/V2L and generated the OS and SDK. Subsequently, I executed C++ and Python programs in OpenCV to capture photos from the USB camera.
However, I encountered the following error (details and source code provided below).
Could you please offer any advice on how to resolve this issue?
Thanks.
root@smarc-rzv2l:~# python3 capture.py or ./take_photo 0
Broadcast message from systemd-journald@smarc-rzv2l (Mon 2024-07-22 01:23:11 UTC):
kernel[177]: [ 350.001240] Internal error: Oops: 96000004 [#1] PREEMPT SMP
kernel[177]: [ 350.195379] Code: 2a0003e5 52800000 f100205f 54000080 (b85fc040)
take_photo.cpp
#include "define.h"
using namespace cv;
int32_t main(int32_t argc, char *argv[]) { __uint8_t video_id = 0;
if (argc > 1) { video_id = atoi(argv[1]);}
VideoCapture cap(video_id);
if (!cap.isOpened()) {
return -1;}
Mat frame;cap >> frame;
if (!frame.empty()) {imwrite("img.png", frame);}
cap.release();return 0;}
Hi motty,
Do you insmod usb camera kernel module (uvc)?
Could you send us the kernel log (by running dmesg)?
Hello, hienhuynh.
hienhuynh said:Do you insmod usb camera kernel module (uvc)?
I didn't try `insmod`.
Could you tell me details?
hienhuynh said:Could you send us the kernel log (by running dmesg)?
I put demsg log, below.
dmesg
[ 82.282556] Unable to handle kernel paging request at virtual address fffffffffffffffc[ 82.290501] Mem abort info:[ 82.293280] ESR = 0x96000004[ 82.296377] EC = 0x25: DABT (current EL), IL = 32 bits[ 82.301729] SET = 0, FnV = 0[ 82.304776] EA = 0, S1PTW = 0[ 82.307987] Data abort info:[ 82.310922] ISV = 0, ISS = 0x00000004[ 82.314989] CM = 0, WnR = 0[ 82.318051] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000048ff1000[ 82.324797] [fffffffffffffffc] pgd=0000000000000000, p4d=0000000000000000[ 82.331605] Internal error: Oops: 96000004 [#1] PREEMPT SMP[ 82.337157] Modules linked in: uvcvideo vspm_if(O) vspm(O) uvcs_drv(O) u_dma_buf(O) mmngrbuf(O) mmngr(O) mali_kbase(O)[ 82.347843] CPU: 1 PID: 308 Comm: v4l2src0:src Tainted: G O 5.10.184-cip36-yocto-standard #1[ 82.357534] Hardware name: Renesas SMARC EVK based on r9a07g054l2 (DT)[ 82.364030] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO BTYPE=--)[ 82.370018] pc : isp_ctrl_chk_index_complete+0x30/0x70[ 82.375132] lr : chk_isp_wakeup.part.23+0x1c/0x30[ 82.379810] sp : ffff8000119dbab0[ 82.383105] x29: ffff8000119dbab0 x28: ffff000011a1c638[ 82.388394] x27: 0000000000000000 x26: 0000000000000000[ 82.393680] x25: ffff8000119dbd58 x24: ffff800010d1d000[ 82.398966] x23: ffff800008ba0aa8 x22: 0000000000000000[ 82.404252] x21: ffff800010d46c78 x20: ffff800010b8c550[ 82.409538] x19: ffff000011a1c828 x18: 0000000000000000[ 82.414824] x17: 0000000000000000 x16: 0000000000000000[ 82.420109] x15: 0000ffffad9ceea0 x14: 0000000100000000[ 82.425395] x13: 0000000000000000 x12: 0000000000000000[ 82.430681] x11: 0000000000000000 x10: 0000000000000000[ 82.435966] x9 : 0000000000000000 x8 : 0000000000000000[ 82.441252] x7 : 0000000000000000 x6 : 0000000000000000[ 82.446538] x5 : 0000000000000000 x4 : 0000000000000000[ 82.451823] x3 : ffff80001131fa98 x2 : 0000000000000000[ 82.457109] x1 : ffff80001131fa38 x0 : 0000000000000000[ 82.462395] Call trace:[ 82.464831] isp_ctrl_chk_index_complete+0x30/0x70[ 82.469597] vb2_core_dqbuf+0x90/0x5d8[ 82.473326] vb2_dqbuf+0x44/0x100[ 82.476659] uvc_dequeue_buffer+0x40/0x68 [uvcvideo][ 82.481604] uvc_ioctl_dqbuf+0x30/0x48 [uvcvideo][ 82.486286] v4l_dqbuf+0x60/0xb8[ 82.489497] __video_do_ioctl+0x184/0x3e8[ 82.493485] video_usercopy+0x14c/0x4d8[ 82.497299] video_ioctl2+0x18/0x58[ 82.500768] v4l2_ioctl+0x40/0x60[ 82.504068] __arm64_sys_ioctl+0x94/0xd0[ 82.507972] el0_svc_common.constprop.4+0x8c/0x180[ 82.512738] do_el0_svc+0x24/0xa0[ 82.516037] el0_svc+0x14/0x20[ 82.519075] el0_sync_handler+0x90/0xb8[ 82.522890] el0_sync+0x160/0x180[ 82.526191] Code: 2a0003e5 52800000 f100205f 54000080 (b85fc040)
The issue is here. There is a problem when dqueue buf with the ISP.
[ 82.462395] Call trace:[ 82.464831] isp_ctrl_chk_index_complete+0x30/0x70[ 82.469597] vb2_core_dqbuf+0x90/0x5d8
By the way, which package did you use for V2L?
hienhuynh said:The issue is here. There is a problem when dqueue buf with the ISP.
I see.
hienhuynh said:By the way, which package did you use for V2L?
I add "meta-rz-features_codec", "meta-rz-features_graphics", "meta-rz-features/meta-rz-drpai", "meta-rz-simple-isp" and "meta-rz-features/meta-rz-opencva".
Hi motty,When applying ISP Support Package (meta-rz-simple-isp), USB Camera can't be used.You can check "1. Note of caution" part at RZ/V2L ISP Support Package note of caution (renesas.com) as we have noticed for each version.To solve your issue you can:- Remove meta-rz-simple-isp layer to using USB Camera- Or using Coral camera (ov5645) instead of USB Cam.
Hello canh.dao.ct
canhdao said:When applying ISP Support Package (meta-rz-simple-isp), USB Camera can't be used.You can check "1. Note of caution" part at RZ/V2L ISP Support Package note of caution (renesas.com) as we have noticed for each version.
Oh! Thank you!!
I have a question. In DRP-AI Package, "DRP-AI" requires "ISP Support".
Doesn't "DRP-AI" require "ISP Support" to build it?
Hi motty,Yes, you don't need to use "ISP Support" to build "DRP-AI".You just need to use it when you need to capture the Google Coral Camera image via V4L2 and displays on the Video monitor the images in YUYV format using Wayland.
Hello canhdao.
OK! I'll try again.