Kernel 4.14 debugging party

Test and fix the Kernel 4.14 features
User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Wed Oct 25, 2017 9:21 pm

Comparing the output from aplay -l to the one from @odroid:

Code: Select all

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: odroidsnd [odroid-snd], device 0: i2s0-sec dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
it shows Subdevices: 1/1 instead of Subdevices: 0/1

Can you post your /etc/asound.conf file?

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Wed Oct 25, 2017 9:53 pm

Here are glmark score at my end.

Code: Select all

odroid@odroid:~$ vi glmark.txt.
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-T628
    GL_VERSION:    OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e
=======================================================
[build] use-vbo=false: FPS: 239 FrameTime: 4.184 ms
[build] use-vbo=true: FPS: 296 FrameTime: 3.378 ms
[texture] texture-filter=nearest: FPS: 313 FrameTime: 3.195 ms
[texture] texture-filter=linear: FPS: 312 FrameTime: 3.205 ms
[texture] texture-filter=mipmap: FPS: 313 FrameTime: 3.195 ms
[shading] shading=gouraud: FPS: 273 FrameTime: 3.663 ms
[shading] shading=blinn-phong-inf: FPS: 272 FrameTime: 3.676 ms
[shading] shading=phong: FPS: 259 FrameTime: 3.861 ms
[shading] shading=cel: FPS: 249 FrameTime: 4.016 ms
[bump] bump-render=high-poly: FPS: 215 FrameTime: 4.651 ms
[bump] bump-render=normals: FPS: 307 FrameTime: 3.257 ms
[bump] bump-render=height: FPS: 301 FrameTime: 3.322 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 208 FrameTime: 4.808 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 73 FrameTime: 13.699 ms
[pulsar] light=false:quads=5:texture=false: FPS: 312 FrameTime: 3.205 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 68 FrameTime: 14.706 ms
[desktop] effect=shadow:windows=4: FPS: 185 FrameTime: 5.405 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 35 FrameTime: 28.571 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 37 FrameTime: 27.027 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 37 FrameTime: 27.027 ms
[ideas] speed=duration: FPS: 171 FrameTime: 5.848 ms
[jellyfish] <default>: FPS: 176 FrameTime: 5.682 ms
[terrain] <default>: FPS: 19 FrameTime: 52.632 ms
[shadow] <default>: FPS: 123 FrameTime: 8.130 ms
[refract] <default>: FPS: 55 FrameTime: 18.182 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 299 FrameTime: 3.344 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 236 FrameTime: 4.237 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 300 FrameTime: 3.333 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 274 FrameTime: 3.650 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 211 FrameTime: 4.739 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 273 FrameTime: 3.663 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 273 FrameTime: 3.663 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 228 FrameTime: 4.386 ms
=======================================================
                                  glmark2 Score: 210
=======================================================

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Wed Oct 25, 2017 10:30 pm

memeka wrote:Comparing the output from aplay -l to the one from @odroid:

Code: Select all

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: odroidsnd [odroid-snd], device 0: i2s0-sec dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
it shows Subdevices: 1/1 instead of Subdevices: 0/1

Can you post your /etc/asound.conf file?
Can we compare the clk_summary on this kernel and 4.9.x kernel it will give us some idea.

I checkout their are now two modules for sound.
CONFIG_SND_SOC_ODROID we should check this out, with original dts setting.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Thu Oct 26, 2017 8:36 am


User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Thu Oct 26, 2017 8:40 am

memeka wrote:Can you post your /etc/asound.conf file?
Sure!

Code: Select all

odroid@odroid:~/odroidxu4-4.14.y$ cat /etc/asound.conf 
pcm.!default {
        type plug
        slave {
                pcm "hw:0,0"
                format S16_LE
                rate 44100
        }
}

ctl.!default {
        type hw
        card 0
}
Did you enable HDMI mode setting in boot.ini file?

Code: Select all

# --- HDMI / DVI Mode Selection ---                                             
# ------------------------------------------                                    
# - HDMI Mode                                                                   
setenv vout "hdmi"                                                              
# - DVI Mode (disables sound over HDMI as per DVI compat)                       
# setenv vout "dvi"

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Thu Oct 26, 2017 6:49 pm

I just can't get any sound out :(
It's very weird :(

@odroid - what .config are you using?
and what version of the sound patch?

maybe my xu4 got damaged :(

in any case, I will wait until the next RC to see :( i spent way too much time on this

User avatar
OverSun
Posts: 1493
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 19 times
Contact:

Re: Kernel 4.14 debugging party

Post by OverSun » Thu Oct 26, 2017 8:02 pm

I've tested fast_memcpy patch, and unfortunately it is completely aarch64 incompatible, there is no way to compile Kodi neither when logic enters the __ARM__ branches (asm is not compatible between armv7l and armv8), neither when doesn't (it seems all the non __ARM__ blocks there are x86 oriented).
So I cannot really apply it, since I try to keep my repo C2 compatible also.
Anyway slight increase in performance is not the way to do it, we need the thing that does zero copy buffers on video to make it right.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Thu Oct 26, 2017 8:31 pm

OverSun wrote:I've tested fast_memcpy patch, and unfortunately it is completely aarch64 incompatible, there is no way to compile Kodi neither when logic enters the __ARM__ branches (asm is not compatible between armv7l and armv8), neither when doesn't (it seems all the non __ARM__ blocks there are x86 oriented).
So I cannot really apply it, since I try to keep my repo C2 compatible also.
Anyway slight increase in performance is not the way to do it, we need the thing that does zero copy buffers on video to make it right.
fast_memcpy can actually determine the arch at runtime, if you look at the code you can just test for aarch64 and define fast_memcpy as memcpy (as it does for some other archs)...

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Thu Oct 26, 2017 9:08 pm

@memeka, I found a null pointer exception in mali driver following change fix this Hope you integrate this change.

Code: Select all

From 9f2d03ae5bc1ab7af45a2fe5c842fa0192355a4f Mon Sep 17 00:00:00 2001
From: Anand Moon <linux.amoon@gmail.com>
Date: Thu, 26 Oct 2017 11:47:58 +0000
Subject: [PATCH] mali/midgard: devfreq: fix null pointer exection for clk

[    2.984038] mali 11800000.mali: Protected mode not available
[    2.991562] mali 11800000.mali: Failed to get clock [fout_vpll]
[    2.996209] mali 11800000.mali: devfreq_add_device: Unable to start governor for the device
[    3.006185] devfreq devfreq0: releasing devfreq which doesn't exist
[    3.011127] Unable to handle kernel NULL pointer dereference at virtual address 000002a6
[    3.019190] pgd = c0004000
[    3.021817] [000002a6] *pgd=00000000

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
index 2ba96f2..5e56142 100644
--- a/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
+++ b/drivers/gpu/arm/midgard/backend/gpu/mali_kbase_devfreq.c
@@ -126,7 +126,7 @@ kbase_devfreq_target(struct device *dev, unsigned long *target_freq, u32 flags)
                return err;
        }*/

-       fout_vpll = clk_get(NULL, "fout_vpll");
+       fout_vpll = clk_get(kbdev->dev, "fout_vpll");
        if (IS_ERR_OR_NULL(fout_vpll)) {
                dev_err(dev, "Failed to get clock [fout_vpll]\n");
                return PTR_ERR(fout_vpll);

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Thu Oct 26, 2017 9:46 pm

moon.linux wrote:@memeka, I found a null pointer exception in mali driver following change fix this Hope you integrate this change.
thanks, i am pushing another rebase now.

User avatar
OverSun
Posts: 1493
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 19 times
Contact:

Re: Kernel 4.14 debugging party

Post by OverSun » Fri Oct 27, 2017 12:10 am

memeka wrote:
OverSun wrote:I've tested fast_memcpy patch, and unfortunately it is completely aarch64 incompatible, there is no way to compile Kodi neither when logic enters the __ARM__ branches (asm is not compatible between armv7l and armv8), neither when doesn't (it seems all the non __ARM__ blocks there are x86 oriented).
So I cannot really apply it, since I try to keep my repo C2 compatible also.
Anyway slight increase in performance is not the way to do it, we need the thing that does zero copy buffers on video to make it right.
fast_memcpy can actually determine the arch at runtime, if you look at the code you can just test for aarch64 and define fast_memcpy as memcpy (as it does for some other archs)...
I did look through the code, and the whole thing is not compiled properly neither when code block thinks it should do arm, neither when it doesn't.
To make it completely go off on aarch64 this code needs to be reviewed and have a third branch of nothing in it to completely avoid being compiled.
I'm really not so fond of the stuff, since this look like a workaround of a real problem anyway, and I really hate workarounds.

User avatar
meveric
Posts: 11085
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4
Has thanked: 42 times
Been thanked: 384 times
Contact:

Re: Kernel 4.14 debugging party

Post by meveric » Fri Oct 27, 2017 5:26 am

I have to agree with OverSun. Kernel 3.10 doesn't have that issue, it''s working fine with the Kodi version that is available, still you want to fix the issue in Kodi instead whatever causes it in the first place.
If Kodi implementation would be broken, it wouldn't work on Kernel 3.10 would it?
The fast_memcopy could be a workaround that works with Kodi, but what is with other programs, that suffer similar issues?
Dreamcast emulation for example also takes a serious blow with Kernel 4.9 (and most likely with 4.14 as well).
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Fri Oct 27, 2017 5:50 am

@meveric, @Oversun - does kodi work well in 3.10 in window mode?

User avatar
meveric
Posts: 11085
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4
Has thanked: 42 times
Been thanked: 384 times
Contact:

Re: Kernel 4.14 debugging party

Post by meveric » Fri Oct 27, 2017 6:21 am

What exactly do you need to know for window mode? UI? Video? What size of window mode?

Edit:
nvm, I just tried it all.. everything works fine: https://oph.mdrjr.net/meveric/other/pic ... e-3.10.png
relatively low CPU usage, no lagging, everything works.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Fri Oct 27, 2017 1:02 pm

memeka wrote:@odroid - what .config are you using?
and what version of the sound patch?
I've used this kernel config in your link without any change. I didn't apply any patch.
https://gist.github.com/mihailescu2m/11 ... 9e18137c3d
Can you test the sound output with PulseAudio GUI volume control?
Sound Preferences -> Hardware -> Test Speakers

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Fri Oct 27, 2017 1:11 pm

If you are observing mouse pointer lagging could your give this patch at try.

Code: Select all

root@odroid:/usr/src/linux-memeka# git diff  arch/arm/boot/dts/exynos5420.dtsi
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dt                                                                     si
index 1ee873c..3cbba5a 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -194,7 +194,7 @@
                 g2d@10850000 {
                         compatible = "samsung,exynos5250-g2d";
                         reg = <0x10850000 0x1000>;
-                        interrupts = <0 91 0>;
+                       interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>;
                         clocks = <&clock CLK_G2D>;
                         clock-names = "fimg2d";
                         iommus = <&sysmmu_g2dr>, <&sysmmu_g2dw>;
root@odroid:/usr/src/linux-memeka#

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Fri Oct 27, 2017 1:20 pm

[quote="moon.linux"]If you are observing mouse pointer lagging could your give this patch at try.

Code: Select all

root@odroid:/usr/src/linux-memeka# git diff  arch/arm/boot/dts/exynos5420.dtsi
[/quote]

I've tried the patch but it doesn't solve the lagging mouse cursor issue at all. :(
Did you see any improvement?

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Fri Oct 27, 2017 1:43 pm

odroid wrote:
memeka wrote:@odroid - what .config are you using?
and what version of the sound patch?
I've used this kernel config in your link without any change. I didn't apply any patch.
https://gist.github.com/mihailescu2m/11 ... 9e18137c3d
Can you test the sound output with PulseAudio GUI volume control?
Sound Preferences -> Hardware -> Test Speakers
It must be something wrong with my odroid. But it’s weird since it works with kernel 4.9 :(
Pulse audio GUI shows volume bars going up and down as I play some sounds, just like the sound I’m playing.
So the os thinks it’s playing sound fine, just that no actual sound is heard :(

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 403 times
Contact:

Re: Kernel 4.14 debugging party

Post by mad_ady » Fri Oct 27, 2017 2:14 pm

@memeka: maybe the problem is not sound output, but sound input. Try this workaround:
* remove cotton plugs from ears
* wash ears with water
Image

Kidding :D

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Fri Oct 27, 2017 2:23 pm

I have tested the sound with Sound Preferences -> Hardware -> Test Speakers and it work ed for me. :D

User avatar
tobetter
Posts: 5206
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Kernel 4.14 debugging party

Post by tobetter » Mon Oct 30, 2017 7:45 am

I've rebased memeka's branch with new tag v4.14-rc7 in mainline tagged about 2 hours ago and pushed to my branch, https://github.com/tobetter/linux/commi ... dxu4-v4.14.
There is no code conflict between the branches, no defection on GBit and USB storages. No idea about display features. :)

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Mon Oct 30, 2017 9:15 am

@tobetter,
Nice!
Which kernel configuration should I use?

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Mon Oct 30, 2017 11:12 am

please note that i have removed the DMA coherent pool size increase patch because there's a "coherent_pool=1M" parameter that can be added to the boot arguments.

but in my tests, using the boot argument did not work well, and I had issues with USB3.
so I will add this patch back when i rebase on rc7.

unfortunately, i have issues with my HDD containing all my code, and I lost some of the data. :(
i will try to recover it, and then rebase on rc7 and push to github. but it might take some days... I hope i can still recover my data, i had there all the patches to kernel, ffmpeg, gstreamer, etc... :oops:

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Kernel 4.14 debugging party

Post by elatllat » Mon Oct 30, 2017 2:25 pm

So nothing that can't be downloaded from github then;

Code: Select all

#!/bin/bash

#
# git_author_to_patch_set.sh
#

set -e
trap 'echo "ERROR: $BASH_SOURCE:$LINENO $BASH_COMMAND" >&2' ERR

AUTHOR="$1"
COUNT=0
TOTAL=$(git log --oneline --author="$AUTHOR" | wc -l)
while read LINE ; do
    COUNT=$[$COUNT+1]
    SHA=$(echo "$LINE" | perl -pe 's/ .*//g')
    FILE="$AUTHOR"_$COUNT"_of_"$TOTAL.patch
    git show $SHA > $FILE
    echo $FILE
done < <(git log --oneline --author="$AUTHOR")
Though using branches has advantages over patchs.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Mon Oct 30, 2017 2:46 pm

@elatllat
i had more patches that on github :P
plus, i don't need to search the repo, since using rebase all the patches are on top of mainline :D very easy to get them with wget https://github.com/mihailescu2m/linux/compare/SHAmainline...odroidxu4-4.14.y.patch ;)

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 8:38 am


I have a USB3-attached PCIe SSD that I just started to use to store my data on.
I was playing with the 4.14 kernel, but going back to the HK 4.9 kernel when testing some patch that would crash the kernel...
Until the SSD started to disconnect randomly and break the journal and mess up my data.
I had to copy as much as the data I could back from the SSD, and recover my repositories... some like the linux kernel was lost forever, so I had to manually reapply the patches that were not pushed on github.

Investigating ... my SSD is disconnecting randomly only on the HK official 4.9 kernel!
Back on the 4.14 kernel ... SSD is stable and works well!

So I think the 4.14 LTS will be a more stable kernel for the XU4, USB3 seems more reliable!

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 403 times
Contact:

Re: Kernel 4.14 debugging party

Post by mad_ady » Tue Oct 31, 2017 11:03 am

@memeka: I take it you were not using this workaround on 4.9?

Code: Select all

echo 20 > /sys/class/block/sda/queue/max_sectors_kb

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Tue Oct 31, 2017 11:45 am

Are we using the latest CEC driver which is current used, because their are missing config option.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 11:48 am

@mad_ady - I didn’t know about it... any idea why it’s not necessary on 4.14?

@moon.linux - we should use the new cec driver but it still needs to be tested with lirc

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 2:59 pm

I have done some more testing with Kodi, both Krypton and Leia.
See if you can spot the difference below:
Yes, we can now stop using a custom kodi, we can just use mainline kodi with ffmpeg support for MFC!

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Tue Oct 31, 2017 3:31 pm

v4l2 accelerated ffmpeg is really awesome! :D
BTW, did you apply Samsung's new MFC patch?

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 403 times
Contact:

Re: Kernel 4.14 debugging party

Post by mad_ady » Tue Oct 31, 2017 3:58 pm

memeka wrote:@mad_ady - I didn’t know about it... any idea why it’s not necessary on 4.14?
That tweak reduced the number of queued sectors for USB transfers so that it would avoid bursty traffic on the bus and thus help with stability in some cases (bad cables, power problems). Maybe 4.14 has a different/better usb driver or maybe that tweak is not relevant for your problem.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 4:25 pm

odroid wrote:v4l2 accelerated ffmpeg is really awesome! :D
BTW, did you apply Samsung's new MFC patch?
If you are referring to the patches that make MFC faster, yes I recovered them an applied them, will push to github later today. But the patches are not really about MFC, but dma memory - it affects many systems (v4l2 on imx and rpi too, eg https://community.nxp.com/thread/282689)
Unless you’re referring to other MFC patches from Samsung :)

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Tue Oct 31, 2017 5:05 pm

Thank you for the link.
Allocating cached buffers to DMA seems to be a key solution. I hope it will solve the slow EGL issue too. EGL rendering performance was around 5~10% slower than Kernel 3.10.
I keep looking into your github. ;)

crossover
Posts: 113
Joined: Wed Jul 22, 2015 2:23 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, USB-IO, HC2, Tinkering kits
Has thanked: 0
Been thanked: 0
Contact:

Re: Kernel 4.14 debugging party

Post by crossover » Tue Oct 31, 2017 5:40 pm

Quite professional and interesting project. Thank you for the great job.

I have a question.
Youtube videos on Chromium browser was very lagging.
As odroid suggested, installing h264fy plugin solved the issue partially.
I can enjoy 480p videos with the plugin. But 720p/1080p is still very sluggish due to pure software decoding(chromium-codecs-ffmpeg(-extra) package?).

Is the new ffmpeg with mfc-v4l2 implementation compatible with the standard video API in Chromium browser?
In that case, can I expect 1080p video playback on Chromium Youtube?

Sorry for bothering hard-core developers.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 5:59 pm

odroid wrote:Thank you for the link.
Allocating cached buffers to DMA seems to be a key solution. I hope it will solve the slow EGL issue too. EGL rendering performance was around 5~10% slower than Kernel 3.10.
I keep looking into your github. ;)
check now, i'm just pushing latest rebase :)
i'm not sure cached dma buffers will help EGL ... i had to manually tell mfc driver to use them ...

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Tue Oct 31, 2017 6:08 pm

We've started too. :D But there seems to be a couple of issues while building the kernel.
https://github.com/hardkernel/linux/com ... dxu4-v4.14

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 6:17 pm

odroid wrote:We've started too. :D But there seems to be a couple of issues while building the kernel.
https://github.com/hardkernel/linux/com ... dxu4-v4.14
mine is up :)

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Tue Oct 31, 2017 6:47 pm

Great! Well re-based on 4.14 rc7. :)

User avatar
odroid
Site Admin
Posts: 34586
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 812 times
Been thanked: 704 times
Contact:

Re: Kernel 4.14 debugging party

Post by odroid » Tue Oct 31, 2017 6:50 pm

crossover wrote:I have a question.
Youtube videos on Chromium browser was very lagging.
As odroid suggested, installing h264fy plugin solved the issue partially.
I can enjoy 480p videos with the plugin. But 720p/1080p is still very sluggish due to pure software decoding(chromium-codecs-ffmpeg(-extra) package?).

Is the new ffmpeg with mfc-v4l2 implementation compatible with the standard video API in Chromium browser?
In that case, can I expect 1080p video playback on Chromium Youtube?
It seems to be possible. But I have no idea how to replace the stock ffmpeg with 3rd party one.
I hope someone knows well the architecture of the Chromium browser video APIs.

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 403 times
Contact:

Re: Kernel 4.14 debugging party

Post by mad_ady » Tue Oct 31, 2017 6:53 pm

It might be doable if compiling Chromium - I think you can point it to a specific ffmpeg installation. Though that ffmpeg should be using the MFC by default to be effective. It needs to be looked-into.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 7:18 pm

odroid wrote:
crossover wrote:I have a question.
Youtube videos on Chromium browser was very lagging.
As odroid suggested, installing h264fy plugin solved the issue partially.
I can enjoy 480p videos with the plugin. But 720p/1080p is still very sluggish due to pure software decoding(chromium-codecs-ffmpeg(-extra) package?).

Is the new ffmpeg with mfc-v4l2 implementation compatible with the standard video API in Chromium browser?
In that case, can I expect 1080p video playback on Chromium Youtube?
It seems to be possible. But I have no idea how to replace the stock ffmpeg with 3rd party one.
I hope someone knows well the architecture of the Chromium browser video APIs.
i can compile ffmpeg to use MFC by default, it's a small change to the code (e.g. my last build had encoder only by default)
but you need to compile chromium with external ffmpeg. or maybe just replace internal ffmpeg :P

but this problem is actually 3 problems:
1. decode video
2. send decoded video to be displayed
3. display video

1. even w/o mfc, decoding is fast with cpu too even 1080p - so MFC support was not really the issue
2. copying buffers is slow with 1080p as we've seen, but it's doable with 720p
3. this is the main issue i think

so having MFC support in ffmpeg will not really help chromium a lot, in my opinion.
it's still worth more to try to compile chromium from the samsung tree...

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Tue Oct 31, 2017 7:24 pm

Update to the 4.14-rc7 rebase:

* s5p-sss support for MD5/SHA1/SHA256 - please not this needs CONFIG_CRYPTO_DEV_EXYNOS_RNG to be disabled. in my config i keep CONFIG_CRYPTO_DEV_EXYNOS_RNG enabled since openssl is not compiled by default with crypto support

* enable cacheable DMA buffers support for greatly increased MFC performance

Still needs testing:

* new CEC driver

* sound needs more testing. in fact, sound drivers needs modifications, since 4.14 already has all clocks definitions added, so instead of re-defining the clocks we should use the existing definitions...

moon.linux
Posts: 1186
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Kernel 4.14 debugging party

Post by moon.linux » Wed Nov 01, 2017 3:21 am

If you want to catch iommu dma bug we should use the default CMA allocation ie CONFIG_CMA_SIZE_MBYTES=96

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Wed Nov 01, 2017 3:32 am

moon.linux wrote:If you want to catch iommu dma bug we should use the default CMA allocation ie CONFIG_CMA_SIZE_MBYTES=96
What iommu dma bug?

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Wed Nov 01, 2017 6:09 am

@odroid - i just pushed a new rebase on top of more fixes (some clk and iommu/drm)

User avatar
OverSun
Posts: 1493
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 19 times
Contact:

Re: Kernel 4.14 debugging party

Post by OverSun » Wed Nov 01, 2017 6:16 am

That's really good.
I was really unsure I can make the codec in time for Kodi v18 release date.

User avatar
memeka
Posts: 4420
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 2 times
Been thanked: 58 times
Contact:

Re: Kernel 4.14 debugging party

Post by memeka » Wed Nov 01, 2017 7:58 am

OverSun wrote:That's really good.
I was really unsure I can make the codec in time for Kodi v18 release date.
And now you don't have to.
The previous screenshot was with ondemand governor, this is why the kodi CPU usage was 90%...
This is kodi leia with ffmpeg MFC decoder and performance governor:

User avatar
tobetter
Posts: 5206
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Kernel 4.14 debugging party

Post by tobetter » Wed Nov 01, 2017 3:48 pm

@memeka & @odroid,
FYI, I've updated my branch with few commits on top of memeka's branch, few EDID commits + kernel configuration from v4.9. I also found few problems that block kernel boot and kernel compile error on Mali driver. CONFIG_CLOCK_THERMAL and CONFIG_DEVFREQ_THERMAL make Mali compile error like below. I am not sure the flags are relevant this and can be fixed. :)

Code: Select all

drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:577:22: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
 .get_static_power = &kbase_get_static_power,
                     ^
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:577:22: note: (near initialization for ‘kbase_ipa_power_model_ops.get_static_power’)
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:578:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
 .get_dynamic_power = &kbase_get_dynamic_power,
                      ^
drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.c:578:23: note: (near initialization for ‘kbase_ipa_power_model_ops.get_dynamic_power’)
 CC [M]  drivers/hid/wacom_sys.o
 CC      net/core/sysctl_net_core.o
 CC [M]  lib/asn1_decoder.o
 LD [M]  fs/cifs/cifs.o
cc1: some warnings being treated as errors
scripts/Makefile.build:313: recipe for target 'drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.o' failed
make[4]: *** [drivers/gpu/arm/midgard/ipa/mali_kbase_ipa.o] Error 1
scripts/Makefile.build:572: recipe for target 'drivers/gpu/arm/midgard' failed
make[3]: *** [drivers/gpu/arm/midgard] Error 2
scripts/Makefile.build:572: recipe for target 'drivers/gpu/arm' failed
make[2]: *** [drivers/gpu/arm] Error 2
make[2]: *** Waiting for unfinished jobs....
Also, I suspect that CGROUP features seem to block kernel booting and I would keep debugging what kernel feature makes boot failure. Maybe tomorrow. :)

crashoverride
Posts: 5010
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 308 times
Contact:

Re: Kernel 4.14 debugging party

Post by crashoverride » Fri Nov 03, 2017 5:51 am

Two issues I noticed are:
1) Firefox will not open and just crashes.
2) In Chrome, when watching youtube, everyone speaking sounds like they inhaled helium out of a balloon.

Post Reply

Return to “Linux Kernel 4.14 Debugging Party”

Who is online

Users browsing this forum: No registered users and 1 guest