This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EVM5777: Linux/TDA2EVM5777: OpenCV does not work in OpenCVCanny

Part Number: TDA2EVM5777


Hello.

I am working on creating a new OpenCV algorithm that works on the A15 core.

First, I built app with the OpenCV Canny algorithm and NullSrc Usecase.

However, OpenCV does not work in Usecase.

The link structure of UC is as follows.

NullSrc (A15) -> Decode -> VPE -> Alg_OpenCVCanny (A15) -> Sgx_Frmcpy (A15) -> Display

The setting of UC was the same with NullSrcDecDisplay and vip_single_cam_opencvcanny_sgx_display UC.

The process of running UC is as follows.
1. cd / opt / vision_sdk
2. source ./vision_sdk_load.sh
3. ./app.out

Here are part of my log messages:

[HOST] [HOST ] 1: 1CH VIP capture + OpenCV Canny (A15) + SGX Copy + DISPLAY
[HOST] [HOST ] 2: 1CH VIP capture + OpenCV OpenCL Dilation (A15 + DSP) + SGX Copy + DISPLAY
[HOST] [HOST ]
[HOST] [HOST ] x: Exit
[HOST] [HOST ]
[HOST] [HOST ] Enter Choice:
[HOST] [HOST ]
1
[HOST] [HOST ] 59.838498 s:
[HOST] [HOST ] 59.860397 s: IPC_OUT_0 : Create in progress !!!
[HOST] [HOST ] 59.860489 s: IPC_OUT_0 : Create Done !!!
[HOST] [IPU2 ] 59.860611 s: IPC_IN_0 : Create in progress !!!
[HOST] [IPU2 ] 59.861770 s: IPC_IN_0 : Create Done !!!
[HOST] [IPU2 ] 59.862197 s: DECODE: Create in progress ... !!!
[HOST] [IPU2 ] 60.286616 s: DECODE: Creating CH0 of 1920 x 1080 [1] [0],target bitrate = 10000 Kbps ...
[HOST] [IPU2 ] 60.287500 s: DECODE: All CH Create ... DONE !!!
[HOST] [IPU2 ] 60.289391 s: DECODE: Create ... DONE !!!
[HOST] [IPU2 ] 60.289818 s: VPE: Create in progress !!!
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
[HOST] [HOST ] 60.382571 s: IPC_IN_0 : Create in progress !!!
[HOST] [HOST ] 60.383029 s: IPC_IN_0 : Create Done !!!
[HOST] [HOST ] 60.383059 s: ALGORITHM: Create in progress (algId = 5) !!!
[HOST] [HOST ] 60.384554 s: ALGORITHM: Create Done (algId = 5) !!!
[HOST] [HOST ] 60.384798 s: SGXFRMCPY: Create in progress for resolution: -1091396864x-1091396860 !!!
[HOST] [HOST ] 60.384889 s: SYSTEM_PVRSCOPE: FIFO /opt/vision_sdk/gpufifo opened successfully
[HOST] [IPU2 ] 60.381138 s: VPE: Loading Down-scaling Co-effs
[HOST] [IPU2 ] 60.381382 s: VPE: Co-effs Loading ... DONE !!!
[HOST] [IPU2 ] 60.381595 s: VPE: Create Done !!!
[HOST] [IPU2 ] 60.381992 s: IPC_OUT_0 : Create in progress !!!
[HOST] [IPU2 ] 60.382327 s: IPC_OUT_0 : Create Done !!!
[HOST] [HOST ] 60.398523 s: EGL: version 1.4
PVR:(Error): [ 824-> 877] < gbm_pvr_bo_create_common():260|ERROR> Failed to allocate DBM buffer: Operation not permitted [0, ]

****** Segmentation fault caught ....
Faulty address is 0x4, called from 0x2396f
Totally Obtained 0 stack frames. signal number =11
Signal number = 11, Signal errno = 0
SI code = 1 (Address not mapped to object)
Fault addr = 0x4
[bt] Execution path:
[HOST] [HOST ] 60.406972 s: EGL: GL Version = (null)
[HOST] [HOST ] 60.406972 s: EGL: GL Vendor = (null)
[HOST] [HOST ] 60.407002 s: EGL: GL Renderer = (null)
[HOST] [HOST ] 60.407002 s: EGL: GL Extensions = (null)
[HOST] [IPU2 ] 60.407185 s:
[HOST] [IPU2 ] 60.407246 s: ### XDC ASSERT - ERROR CALLBACK START ###
[HOST] [IPU2 ] 60.407307 s:
[HOST] [IPU2 ] 60.407430 s: out of memory: handle=0x99e1eabc, size=2525868032
[HOST] [IPU2 ] 60.407521 s:
[HOST] [IPU2 ] 60.407582 s: ### XDC ASSERT - ERROR CALLBACK END ###
[HOST] [IPU2 ] 60.407643 s:
TIOCL FATAL: Failed to allocate 0x1fa4000 from CMEM block 0, allocated 0xaa7bb000

Why did it go wrong?

and What should I do?

Please help me.

Best Regards,