Porting ODROID-XU HW features into mainline kernel

Post Reply
doggisbag
Posts: 31
Joined: Wed Nov 20, 2019 7:46 am
languages_spoken: english, spanish
ODROIDs: 2x Odroid-XU
Has thanked: 23 times
Been thanked: 8 times
Contact:

Porting ODROID-XU HW features into mainline kernel

Post by doggisbag »

Hi!

I'm currently trying to enable some features of XU that had worked when Hardkernel supported it. Despite samsung SoC maintainers did a great job for XU working in mainline, there's still a lot of HW capabilities not enabled yet, and probably Exynos5410 is very low priority for them as its an EOL product.

Anyways, Exynos5410 shares a lot of the other Exynos54xx SoCs, this is extremely helpful as some things that are working on mainline can be ported without further changes.

For now, through kernel modification i've managed to get some dmesg related with mfc codec detected from device tree thanks to adding some clocks definitions into clk-exynos5410.c, exynos5410.h and exynos5410.dtsi. Values and style definitions were ported between kernel 3.4y branch and mainline exynos5420 sources. Finally, those changes were put in my custom archlinux ARM PKGBUILD which gave me linux-headers and firmware patched. All this work is done following cargo-cult and copy-paste programming styles as still being new to linux kernel and drivers implementation.

dmesg:

Code: Select all

[    8.118678] s5p-secss 10830000.sss: s5p-sss driver registered
[    8.257742] s5p-mfc 11000000.codec: Adding to iommu group 0
[    8.309681] s5p-mfc 11000000.codec: preallocated 8 MiB buffer for the firmware and context buffers
[    8.351043] s5p-mfc 11000000.codec: decoder registered as /dev/video0
[    8.359553] s5p-mfc 11000000.codec: encoder registered as /dev/video1
checking with v4l2 utility:

Code: Select all

[root@alarm alarm]# v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'VM12' (Y/CbCr 4:2:0 (16x16 MB, N-C))
        [1]: 'NM12' (Y/CbCr 4:2:0 (N-C))
        [2]: 'NM21' (Y/CrCb 4:2:0 (N-C))

[root@alarm alarm]# v4l2-ctl -d /dev/video1 --list-formats
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'H264' (H.264, compressed)
        [1]: 'MPG4' (MPEG-4 Part 2 ES, compressed)
        [2]: 'H263' (H.263, compressed)

Unfortunately, there's a lot of things missing that needs to be fixed. A reason for that is some debug info that might be related with video4linux2 driver interface.

When writing v4l2-ctl -d /dev/video0 --all, dmesg outputs the following

Code: Select all

[  160.053369] vidioc_g_selection:764: Can not get compose information
[  160.058679] vidioc_g_selection:764: Can not get compose information
[  163.963070] vidioc_g_selection:764: Can not get compose information
[  163.968496] s5p-mfc 11000000.codec: Decoding not initialised
[  163.974979] vidioc_g_selection:764: Can not get compose information
[  189.723807] vidioc_g_selection:764: Can not get compose information
[  189.729231] s5p-mfc 11000000.codec: Decoding not initialised
[  189.735741] vidioc_g_selection:764: Can not get compose information
[  199.629942] vidioc_g_selection:764: Can not get compose information
[  199.635702] vidioc_g_selection:764: Can not get compose information
[  214.312226] vidioc_g_selection:764: Can not get compose information
[  214.317373] vidioc_g_selection:764: Can not get compose information
[  252.043241] vidioc_g_selection:764: Can not get compose information
[  252.055011] vidioc_g_fmt:347: Format could not be read
[  252.063471] vidioc_g_selection:764: Can not get compose information
[  252.068300] vidioc_g_selection:764: Can not get compose information
[  252.074542] vidioc_g_selection:764: Can not get compose information
[  252.080786] vidioc_g_selection:764: Can not get compose information
[  252.087025] vidioc_g_selection:764: Can not get compose information
[  252.093272] vidioc_g_selection:764: Can not get compose information
[  252.099508] vidioc_g_selection:764: Can not get compose information
[  252.105752] vidioc_g_selection:764: Can not get compose information
[  252.111999] vidioc_g_selection:764: Can not get compose information
[  252.118894] s5p-mfc 11000000.codec: Decoding not initialised
[  252.124489] vidioc_g_selection:764: Can not get compose information
Now, for v4l2-ctl -d /dev/video1 --all, dmesg outputs:

Code: Select all

[  965.203994] vidioc_g_parm:2262: Setting FPS is only possible for the output queue
[  965.210138] s5p-mfc 11000000.codec: Encoding not initialised
Anyways, i'm pretty optimist that this will going to work.
These users thanked the author doggisbag for the post (total 2):
odroid (Tue Nov 17, 2020 2:36 pm) • Nuems (Sun Nov 22, 2020 9:50 pm)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest