Armbian kernel for IMX.6 missing VPU / CODA960 support?


Recommended Posts

Hello,

 

I have recently tried a more recent kernel  5.10.x for my HummingBoard with imx6 solo. After playing with GPU/OpenGL acceleration I have noticed that there is no H.264/MJPEG Video acceleration present in the kernel. The video codec Chips&Media 960 driver module (kernel option VIDEO_CODA) is simply not build in.

Why is that? Can it be enabled by default for future IMX6 builds?

 

Thanks for your support!!

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Hi Igor,

 

I reckon this "someone" could be me? :)

I have build cubox kernel with the below diff on the "linux-imx6-current.config"  and it apparently works.

+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_V4L2_JPEG_HELPER=m
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_VIDEO_CODA=m
+CONFIG_VIDEO_IMX_VDOA=m

 

1. Kernel boots and is detecting  the codec

[   29.911784] coda 2040000.vpu: Direct firmware load for vpu_fw_imx6d.bin failed with error -2
[   29.961350] coda 2040000.vpu: Using fallback firmware vpu/vpu_fw_imx6d.bin
[   29.964619] coda 2040000.vpu: Firmware code revision: 46063
[   29.964636] coda 2040000.vpu: Initialized CODA960.
[   29.964645] coda 2040000.vpu: Firmware version: 3.1.1
[   29.969814] coda 2040000.vpu: encoder registered as video0
[   29.970090] coda 2040000.vpu: decoder registered as video1
[   29.970348] coda 2040000.vpu: encoder registered as video2
[   29.970715] coda 2040000.vpu: decoder registered as video3

 

2. v4l2-ctl reports the devices as being CODA960
 

CODA960 (platform:coda):
    /dev/video0
    /dev/video1
    /dev/video2
    /dev/video3

imx-capture (platform:ipu1_csi0):
    /dev/video4

imx-capture (platform:ipu1_csi1):
    /dev/video7

imx-capture (platform:ipu1_ic_prpenc):
    /dev/video5

imx-capture (platform:ipu1_ic_prpvf):
    /dev/video6

 

3. GStreamer has plugins for V4L2 video decoder, so finally lets give it a try with some h.264...

gst-launch-1.0 filesrc location=Big_Buck_Bunny_720_10s_30MB.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! v4l2h264dec ! kmssink

 

The video is ok, cat /proc/interrupts shows activity on the VPU, and the CPU load is low (5%-10% on i.mx.6 SOLO!), so the video acceleration is there!.

 

Igor, can you take it from here and integrate it or should I dare and make a PR for this?

 

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...