Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable IMX6 VPU(CODA960) in the kernel config as module. #2723

Merged
merged 1 commit into from Mar 18, 2021

Conversation

@themilord
Copy link
Contributor

@themilord themilord commented Mar 17, 2021

Enables HW acceleration of video en-/decoding through v4l2 interface

Description

I follow up to the discussion here:
https://forum.armbian.com/topic/17282-armbian-kernel-for-imx6-missing-vpu-coda960-support/

Support for video accceleration was missing in the current imx6 kernel. I have enabled the VPU in the kernel config to build the CODA960 driver as a module to use he codec built in the SoC.

How Has This Been Tested?

Using SolidRun Hummingboard with Imx6 solo module

I have build cubox kernel with the attached "linux-imx6-current.config"

  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

  1. 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.Tried gstreamer to play h.264 with v4l2 decoding

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.

@igorpecovnik igorpecovnik merged commit 9ef3fe9 into armbian:master Mar 18, 2021
2 checks passed
2 checks passed
@github-actions
shellcheck
Details
@github-actions
Compile changed kernel
Details
@igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Mar 18, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants