Video decoding with hardware acceleration on i.MX6 + Kirkstone BSP + chromium + V4L2 CODA driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Video decoding with hardware acceleration on i.MX6 + Kirkstone BSP + chromium + V4L2 CODA driver

572 Views
fr5
Contributor IV

Hi,

I am giving a shot to the following configuration :
- i.MX 6Quad SABRE SD EVK
- BSP Kirkstone 5.15.71_2.2.0
- Chromium 101
- V4L2 coda960 driver

For that :
- I modify the sources/meta-imx/meta-sdk/dynamic-layers/chromium-browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend so existing patch for mx8-nxp-bsp is also applied to mx6-nxp-bsp
- I enable coda driver (in defconfig and device tree)

Coda driver is correctly initialized :
root@imx6qsabresd:~# dmesg | grep coda
[ 10.844906] coda 2040000.vpu: Firmware code revision: 46076
[ 10.854031] coda 2040000.vpu: Initialized CODA960.
[ 10.859325] coda 2040000.vpu: Firmware version: 3.1.1
[ 10.879319] coda 2040000.vpu: coda-jpeg-encoder registered as video0
[ 10.933786] coda 2040000.vpu: coda-jpeg-decoder registered as video1
[ 10.946304] coda 2040000.vpu: coda-video-encoder registered as video2
[ 10.958925] coda 2040000.vpu: coda-video-decoder registered as video3

In chromium, video decoding is launched but goes to the following error quickly, then video is read without hardware acceleration :
[709:792:0428/174343.512946:VERBOSE2:v4l2_video_decode_accelerator.cc(1163)] AppendToInputFrame(): plane_size : 4096
[709:794:0428/174343.512940:VERBOSE2:generic_v4l2_device.cc(104)] Poll():
[709:792:0428/174343.512995:VERBOSE2:v4l2_video_decode_accelerator.cc(1164)] AppendToInputFrame(): bytes_used : 0
[709:792:0428/174343.513045:VERBOSE2:v4l2_video_decode_accelerator.cc(1165)] AppendToInputFrame(): size : 15
[709:792:0428/174343.513091:VERBOSE2:v4l2_device.cc(1094)] GetPlaneMapping():
[709:792:0428/174343.513134:VERBOSE2:v4l2_device.cc(475)] GetPlaneMapping():
[709:792:0428/174343.513178:VERBOSE2:generic_v4l2_device.cc(134)] Mmap():
[709:792:0428/174343.513297:VERBOSE2:v4l2_device.cc(1117)] SetPlaneBytesUsed():
[709:792:0428/174343.513353:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.513398:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.513448:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.513491:VERBOSE2:v4l2_device.cc(780)] QueueBuffer():
[709:792:0428/174343.513535:VERBOSE2:v4l2_device.cc(1640)] QueueBuffer():
[709:792:0428/174343.513607:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.513700:VERBOSE2:generic_v4l2_device.cc(145)] SetDevicePollInterrupt():
[709:792:0428/174343.513773:VERBOSE2:v4l2_device.cc(1784)] Streamon():
[709:792:0428/174343.513825:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.514348:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.514469:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.514616:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.514677:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.514728:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.514773:VERBOSE2:v4l2_video_decode_accelerator.cc(1163)] AppendToInputFrame(): plane_size : 4096
[709:792:0428/174343.514822:VERBOSE2:v4l2_video_decode_accelerator.cc(1164)] AppendToInputFrame(): bytes_used : 0
[709:792:0428/174343.514870:VERBOSE2:v4l2_video_decode_accelerator.cc(1165)] AppendToInputFrame(): size : 8
[709:792:0428/174343.514917:VERBOSE2:v4l2_device.cc(1094)] GetPlaneMapping():
[709:792:0428/174343.514962:VERBOSE2:v4l2_device.cc(475)] GetPlaneMapping():
[709:792:0428/174343.515025:VERBOSE2:v4l2_device.cc(1117)] SetPlaneBytesUsed():
[709:792:0428/174343.515073:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.515118:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.515169:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.515213:VERBOSE2:v4l2_device.cc(780)] QueueBuffer():
[709:792:0428/174343.515257:VERBOSE2:v4l2_device.cc(1640)] QueueBuffer():
[709:792:0428/174343.515300:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.515383:VERBOSE2:generic_v4l2_device.cc(145)] SetDevicePollInterrupt():
[709:792:0428/174343.515437:VERBOSE2:v4l2_device.cc(1784)] Streamon():
[709:792:0428/174343.515487:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.515546:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.515766:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.515835:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.515883:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.515931:VERBOSE2:v4l2_video_decode_accelerator.cc(1163)] AppendToInputFrame(): plane_size : 4096
[709:792:0428/174343.515983:VERBOSE2:v4l2_video_decode_accelerator.cc(1164)] AppendToInputFrame(): bytes_used : 0
[709:792:0428/174343.516030:VERBOSE2:v4l2_video_decode_accelerator.cc(1165)] AppendToInputFrame(): size : 65
[709:792:0428/174343.516079:VERBOSE2:v4l2_device.cc(1094)] GetPlaneMapping():
[709:792:0428/174343.516127:VERBOSE2:v4l2_device.cc(475)] GetPlaneMapping():
[709:792:0428/174343.516172:VERBOSE2:v4l2_device.cc(1117)] SetPlaneBytesUsed():
[709:792:0428/174343.516218:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.516263:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.516311:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.516357:VERBOSE2:v4l2_device.cc(780)] QueueBuffer():
[709:792:0428/174343.516400:VERBOSE2:v4l2_device.cc(1640)] QueueBuffer():
[709:792:0428/174343.516444:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.516535:VERBOSE2:generic_v4l2_device.cc(145)] SetDevicePollInterrupt():
[709:792:0428/174343.516591:VERBOSE2:v4l2_device.cc(1784)] Streamon():
[709:792:0428/174343.516641:VERBOSE2:generic_v4l2_device.cc(94)] Ioctl():
[709:792:0428/174343.516701:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.517340:VERBOSE2:v4l2_device.cc(754)] V4L2BufferRefBase():
[709:792:0428/174343.517421:VERBOSE2:v4l2_device.cc(1057)] GetPlaneSize():
[709:792:0428/174343.517469:VERBOSE2:v4l2_device.cc(1139)] GetPlaneBytesUsed():
[709:792:0428/174343.517515:VERBOSE2:v4l2_video_decode_accelerator.cc(1163)] AppendToInputFrame(): plane_size : 4096
[709:792:0428/174343.517570:VERBOSE2:v4l2_video_decode_accelerator.cc(1164)] AppendToInputFrame(): bytes_used : 0
[709:792:0428/174343.517619:VERBOSE2:v4l2_video_decode_accelerator.cc(1165)] AppendToInputFrame(): size : 152773
[709:792:0428/174343.517669:ERROR:v4l2_video_decode_accelerator.cc(1168)] over-size frame, erroring

I am trying to figure out where the error is coming from, does anyone have any tips for this ?
More generally, has anyone managed to use a comparable configuration successfully and could share their experience ?

Regards

0 Kudos
2 Replies

510 Views
fr5
Contributor IV

Thank you @Bio_TICFSL , yes I had in mind that the coda drivers for i.MX6/i.MX8 were different.

The above logs are the ones I get with the coda960 driver which is i.MX6 specific.

Regards

 

0 Kudos

537 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

 

Sorry the driver is just for MX8 since it uses a different VPU, it can not work with MX6. So far chromium +V4l2 works without been accelerated.

Sorry for that

 

0 Kudos