Kernel 4.14 debugging party

Test and fix the Kernel 4.14 features
Post Reply
User avatar
Snk
Posts: 275
Joined: Sun Jul 31, 2016 6:43 am
languages_spoken: Portuguese
ODROIDs: XU4 + eMMC 32GB + UART
Has thanked: 0
Been thanked: 0
Contact:

Re: Kernel 4.14 debugging party

Post by Snk » Thu Oct 19, 2017 11:05 pm

Any possibility of Kodi 17.4 working properly 1080p in kernel 4.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 » Thu Oct 19, 2017 11:18 pm

Snk wrote:Any possibility of Kodi 17.4 working properly 1080p in kernel 4.14?
see just a few messages back on this thread: viewtopic.php?f=146&t=28692&start=50#p204513
and also viewtopic.php?f=146&t=28692&start=50#p204657

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 19, 2017 11:22 pm

MastaG wrote:@memeka thank you zo much for you work.
Regarding your open issue with the Mali driver. Can't HK assist you with this?
They're planning on keeping support for the xu3/4 for a little longer so it would be nice to have those missing extensions before support ends..
unfortunately it seems HK does not have wayland license so they cannot help :(
only arm can help by releasing a new version of the driver.....

User avatar
Snk
Posts: 275
Joined: Sun Jul 31, 2016 6:43 am
languages_spoken: Portuguese
ODROIDs: XU4 + eMMC 32GB + UART
Has thanked: 0
Been thanked: 0
Contact:

Re: Kernel 4.14 debugging party

Post by Snk » Thu Oct 19, 2017 11:48 pm

memeka wrote:
Snk wrote:Any possibility of Kodi 17.4 working properly 1080p in kernel 4.14?
see just a few messages back on this thread: viewtopic.php?f=146&t=28692&start=50#p204513
and also viewtopic.php?f=146&t=28692&start=50#p204657
I'm waiting for HK to release the patch.

Thanks, memeka!

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 19, 2017 11:55 pm

HK might release kodi with new image in december...

@Snk try this, it takes 1 minute:

1. download https://transfer.sh/udNA3/magicjuice.so and place magicjuice.so in /usr/local/lib folder
2. start kodi (the one you already have installed, from HK repository) from terminal with LD_PRELOAD=/usr/local/lib/magicjuice.so kodi

let me know how that works :)

User avatar
Snk
Posts: 275
Joined: Sun Jul 31, 2016 6:43 am
languages_spoken: Portuguese
ODROIDs: XU4 + eMMC 32GB + UART
Has thanked: 0
Been thanked: 0
Contact:

Re: Kernel 4.14 debugging party

Post by Snk » Fri Oct 20, 2017 6:20 am

memeka wrote:HK might release kodi with new image in december...

@Snk try this, it takes 1 minute:

1. download https://transfer.sh/udNA3/magicjuice.so and place magicjuice.so in /usr/local/lib folder
2. start kodi (the one you already have installed, from HK repository) from terminal with LD_PRELOAD=/usr/local/lib/magicjuice.so kodi

let me know how that works :)
Whenever I open Kodi, I'll have to open for this command, 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 » Fri Oct 20, 2017 6:53 am

Does it work?
Yes you need to open it like that until a new kodi is released with the patch included

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 20, 2017 8:08 am

Nice! I can play 1080p H.264 videos smoothly with Kodi 17.3 on Kernel 4.9.57 :D
What is your magic in magicjuice.so lib?
Did you add the NEON accelerated memcpy?

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 20, 2017 9:02 am

odroid wrote:Nice! I can play 1080p H.264 videos smoothly with Kodi 17.3 on Kernel 4.9.57 :D
What is your magic in magicjuice.so lib?
Did you add the NEON accelerated memcpy?
yes :) it's the same patch applied to my kodi, taken out in separate library to be easy to use without upgrading kodi :D

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 20, 2017 9:11 am

Thank you for the confirmation.
We will include Kodi 17.4 or 17.5 with your patch when we release an official image with Kernel 4.14 in December.
But I don't still fully understand how oversun's Kodi build has no vsync issue. Any idea?

Anyway, we need to find a way to enable the VSYNC for other game emulator developers.
OGST, Lakka, RetroPie, Batocera and RecallBox devs are still using the old Kernel 3.10 due to the issue.
Kernel 3.10 will be EOLed in a few weeks probably.

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 » Fri Oct 20, 2017 10:00 am

I forget where I read it but there was once a commit to change calling vsync from after to before write (I have no idea what I'm talking about).

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 20, 2017 2:47 pm

So what's the patches applied to Kodi, so I can think about merging them?
fast_memcpy I can think about, allright, it's so-so.
But don't tell me that you want to shift MFC timestamps back to Kodi from the kernel. Really, every time I hear that this is the best idea I shiver.

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 20, 2017 2:54 pm

Yes, the patch is fast_memcpy().
Please merge it.

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 Oct 20, 2017 3:17 pm

odroid wrote:Anyway, we need to find a way to enable the VSYNC for other game emulator developers.
I posted a workaround for VSync in X11 during the 4.9 debug party:
https://github.com/OtherCrashOverride/m ... pp#L55-L75

Code: Select all

		// Wait for VSYNC
		glFinish();

		drmVBlank vbl =
		{
			.request =
			{
				.type = DRM_VBLANK_RELATIVE,
				.sequence = 1,
			}
		};

		int io = drmWaitVBlank(fd, &vbl);
		if (io)
		{
			throw Exception("drmWaitVBlank failed.");
		}

		// Swap
		window->SwapBuffers();

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 20, 2017 5:42 pm

something to note:

I tested the perf counters, and they don't actually work :(
they appear in the list, but don't give any samples....

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 20, 2017 6:05 pm

Perf: Yep they dont not register interrupt pmu per cpu.
On odroid-u3 is shows

Code: Select all

root@odroid:~# cat /proc/interrupts | grep pmu
 38:          0          0          0          0  COMBINER  18 Edge      arm-pmu
 39:          0          0          0          0  COMBINER  26 Edge      arm-pmu
 40:          0          0          0          0  COMBINER 146 Edge      arm-pmu
 41:          0          0          0          0  COMBINER 154 Edge      arm-pmu
On odroidxu4 it not registering.

Code: Select all

root@odroid:~# cat /proc/interrupts | grep pmu
root@odroid:~# cat /proc/interrupts | grep pmu
root@odroid:~#

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 20, 2017 6:23 pm

crashoverride wrote:
odroid wrote:Anyway, we need to find a way to enable the VSYNC for other game emulator developers.
I posted a workaround for VSync in X11 during the 4.9 debug party:
https://github.com/OtherCrashOverride/m ... pp#L55-L75
Thank you for the workaround.
But many emulators seem to have a traditional way to use the vsync with fbdev.
So your implementation might not be applicable for most emulators even I am not sure.
I think the vsync call should be matched to the DRM driver vsync for easier implementation.

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 20, 2017 7:14 pm

moon.linux wrote:Perf: Yep they dont not register interrupt pmu per cpu.
On odroid-u3 is shows

Code: Select all

root@odroid:~# cat /proc/interrupts | grep pmu
 38:          0          0          0          0  COMBINER  18 Edge      arm-pmu
 39:          0          0          0          0  COMBINER  26 Edge      arm-pmu
 40:          0          0          0          0  COMBINER 146 Edge      arm-pmu
 41:          0          0          0          0  COMBINER 154 Edge      arm-pmu
On odroidxu4 it not registering.

Code: Select all

root@odroid:~# cat /proc/interrupts | grep pmu
root@odroid:~# cat /proc/interrupts | grep pmu
root@odroid:~#
I have fixed the PMU counters with the help from Marek.
The interrupts you had were wrong, this is why they were not registering.

I did a force update with the working PMU patch, and all previous patches renamed more nicely...

Code: Select all

root@odroid:~# cat /proc/interrupts | grep pmu
138:      36631          0          0          0          0          0          0          0     GICv2 192 Level     arm-pmu
139:          0       2250          0          0          0          0          0          0     GICv2 193 Level     arm-pmu
140:          0          0         78          0          0          0          0          0     GICv2 194 Level     arm-pmu
141:          0          0          0        145          0          0          0          0     GICv2 195 Level     arm-pmu
142:          0          0          0          0          0          0          0          0  COMBINER  10 Edge      arm-pmu
143:          0          0          0          0          0         16          0          0  COMBINER  56 Edge      arm-pmu
144:          0          0          0          0          0          0          0          0  COMBINER 134 Edge      arm-pmu
145:          0          0          0          0          0          0          0          0  COMBINER 154 Edge      arm-pmu

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 » Sat Oct 21, 2017 7:33 pm

can someone that has knowledge of LIRC can test CEC?

With the new kernel, CEC is seen as a "remote control":

Code: Select all

root@odroid:~# dmesg | grep -i cec
[    3.477764] Registered IR keymap rc-cec
[    3.480487] rc rc0: RC for s5p-cec as /devices/platform/soc/101b0000.cec/rc/rc0
[    3.487806] input: RC for s5p-cec as /devices/platform/soc/101b0000.cec/rc/rc0/input0
so with lirc you can test if the TV remote works, when odroid is connected to TV...
this means that kodi now doesn't need libcec anymore, but it can be configured just as a lirc remote...

Code: Select all

root@odroid:~# cec-compliance 
cec-compliance SHA                 : not available

Driver Info:
        Driver Name                : s5p-cec
        Adapter Name               : s5p-cec
        Capabilities               : 0x0000005e
                Logical Addresses
                Transmit
                Passthrough
                Remote Control Support
        Driver version             : 4.14.0
        Available Logical Addresses: 1
        Physical Address           : 1.0.0.0
        Logical Address Mask       : 0x0000
        CEC Version                : 2.0
        Logical Addresses          : 0 

FAIL: missing logical address(es), use cec-ctl to configure this

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 » Sun Oct 22, 2017 2:51 am

CEC protocol has change version 2.0, HK 4.9 used ported old driver to support this on 4.9.x

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 » Mon Oct 23, 2017 6:50 am

memeka wrote:+ ODROID-XU4: Never blend the base layer
https://github.com/hardkernel/linux/com ... 5175c572d4
- no idea why it's necessary
On Exynos there is a solid color plane that is logically below all the other display planes. This causes display artifacts due to alpha:
viewtopic.php?f=146&t=26666

The patch disables blending (no alpha) the base plane with the solid color plane.

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 23, 2017 7:47 am

crashoverride wrote:
memeka wrote:+ ODROID-XU4: Never blend the base layer
On Exynos there is a solid color plane that is logically below all the other display planes. This causes display artifacts due to alpha:
viewtopic.php?f=146&t=26666

The patch disables blending (no alpha) the base plane with the solid color plane.
Thanks @crashoverride; if it's confirmed to have issues on 4.14 I'll pick the commit; I did test on gst X11 but I don't remember having the wrong colors, I'll look again next time I'm testing X11.

lazlo
Posts: 143
Joined: Sun Oct 01, 2017 11:32 am
languages_spoken: english
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Kernel 4.14 debugging party

Post by lazlo » Tue Oct 24, 2017 5:00 am

I just wanted to write a short post and say thanks to everyone working on the new kernel. I know it's a complicated process and at times it can seem overwhelming. So here is something to bring a smile to your face:

https://xkcd.com/1906/

Thanks again and keep up the hard work!



lazlo

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 24, 2017 12:11 pm

thx @lazlo

git repository rebased on linux 4.14-rc6
would love some more feedback in the areas of sound, usb3/gb eth/CEC :)

btw, tested operf, working very nice!

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 24, 2017 2:14 pm

Nice to see rc6 so quickly.
I'm pulling your git now.
Did you update your kernel config file too?
Can you give me a link of your config file?

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 24, 2017 3:28 pm

odroid wrote:Nice to see rc6 so quickly.
I'm pulling your git now.
Did you update your kernel config file too?
Can you give me a link of your config file?
config file (has perf and operf enabled): https://gist.github.com/mihailescu2m/11 ... 9e18137c3d

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 24, 2017 5:17 pm

gstreamer on x11 vs wayland playing 1080p video (kernel 4.14-rc6):


on both platforms, playing 1080p video uses 60-70% total CPU (~40% highest core load) - this is more than 2x better than software decoding (which needs ~160% CPU)
the comparison is not fair since on x11 i use sync=false flag :) but with similar settings they are now behaving in a similar way.

PS: sorry for blurry video, i was in a hurry
PSS: yes X11 shows wrong color, and i know the fix for that (thanks to @crashoverride)

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 24, 2017 6:11 pm

Oh.. Great to see 1080p video can play with gstreamer on wayland as well as x11. I hope the x11 color issue can be fixed soon. :D

By the way, my XU4 booted RC6 kernel beautifully. I will run USB 3.0 UAS storage stability test for 10 hours and get back to you.

Code: Select all

odroid@odroid:~$ uname -a
Linux odroid 4.14.0-rc6-05-g67d979f #1 SMP PREEMPT Tue Oct 24 08:48:05 UTC 2017 armv7l armv7l armv7l GNU/Linux 

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 24, 2017 6:21 pm

USB driver seems to have an issue with warm-boot. :(

USB 3.0 hub controller works in USB 3.0 mode after cold-boot.

Code: Select all

odroid@odroid:~$ lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M
USB 3.0 part in the hub-controller doesn't work after warm-boot from time to time.

Code: Select all

odroid@odroid:~$ lsusb -t                                                                        
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M                              
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M                    
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M                               
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M                              
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M                               
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/2p, 480M                                      
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M                             
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M  
I remember we had a similar issue when we ported Kernel 4.9.
We will try to find a missing 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 24, 2017 6:26 pm

@odroid thanks for the testing

The USB3 warm boot reset patch is already included in my kernel: https://github.com/mihailescu2m/linux/c ... 1248996b86
If there is another patch, please let me know :(

I have warm booted with USB3 drive attached (not hub), and it was properly detect as USB3, not USB2. Do you have any device connected to the hub?

EDIT: I have already pushed the patch for the color fix. as usual, i have done a rebase and inserted the patch somewhere back into the history :twisted:
so be careful when pulling the update :?

EDIT2: the performance of gstreamer in x11 is good, until you move the mouse. I don't have a WM, so I am not using the fast mouse in mate => when moving mouse, everything on desktop gets slow including gstreamer dropping frames. I suspect it's better in mate, but I can't test :D
Last edited by memeka on Tue Oct 24, 2017 6:42 pm, edited 2 times in total.

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 24, 2017 6:35 pm

@memeka very good work.

But next time when release re-base the changes on pull request from exynos clk/drm/dts maintainer these are meant for 4.15.x

Code: Select all

DTS  https://lkml.org/lkml/2017/10/15/8
DRM git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
CLK git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git
This will increase stability of the code.

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 24, 2017 6:43 pm

Yes, the patch was already merged.

I've connected a SSD via USB-to-SATA bridge.
When it works in 3.0 mode well after cold-boot.
If I did warm boot several times, it worked in USB 2.0 mode a couple of times.
Tomorrow, I will do further tests to reproduce the issue certainly.

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 24, 2017 6:53 pm

moon.linux wrote:@memeka very good work.

But next time when release re-base the changes on pull request from exynos clk/drm/dts maintainer these are meant for 4.15.x

Code: Select all

DTS  https://lkml.org/lkml/2017/10/15/8
DRM git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
CLK git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git
This will increase stability of the code.
Can you tell me how those patches increase the system stability?
What did you test with it?

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 24, 2017 7:01 pm

@moon.linux thanks for the links, I have already seen most of them and some are already applied.

but I don't want to add patches from 4.15 kernel to 4.14 kernel unless they are very necessary. for example, all the clk patches in the repository you gave me are for exynos4412 and exynos5433, so makes no sense to add them just to have more patches to maintain. also patches from 4.15 that do "cleanup" are not really necessary since they don't do any obvious improvements.

1) i have seen already the dts patch to enable odroid HC1 but I did not apply yet, because it removes the odroidxu3-common.dtsi which already contains patches, so it's harder to apply. i will revisit it later.
2) there are a few patches for mixer resolutions. i did not pick yet any from there, or from the 4.9 kernel - i would actually like someone to compile a list of resolutions that don't work, and make a list of patches that support them...
3) there is a very new patch for HDMI audio: https://patchwork.kernel.org/patch/10022441/ -- does anyone know if this will enable hdmi sound on XU4 so that i can revert that big patch for i2s master mode?

thanks,

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 24, 2017 7:09 pm

Exynos platform is meant for common development for all the dev boards.
Be it for Exynos4/54xx/5433 all these are tested with common source code build, not code changes are specific for any platform.

So unless we test these change we dont know where we are going wrong. Eventually we will use the code in the future.

Code: Select all

3) there is a very new patch for HDMI audio: https://patchwork.kernel.org/patch/10022441/ -- does anyone know if this will enable hdmi sound on XU4 so that i can revert that big patch for i2s master mode?
change enable HDMI codec needed..but my guess this is harmless changes unless it breaks our working sound driver.

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 24, 2017 10:15 pm

i've ammended the hc1 patch and pushed it to my repo.
can someone with a hc1 try 4.14 and check everything is ok?

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 » Wed Oct 25, 2017 10:17 am

memeka wrote:i've ammended the hc1 patch and pushed it to my repo.
can someone with a hc1 try 4.14 and check everything is ok?
XU4 OS image can run on HC1 without any change. They are fully compatible each other.
Can you give me a link of the HC1 specific patch?

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 » Wed Oct 25, 2017 10:25 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 » Wed Oct 25, 2017 10:45 am

Thank you for the link.
But I don't like to add another DT file since XU4 DT works well with HC1. I already tested and confirmed the functionality.
If we add another DT, we need to change the boot.ini and make a logic to detect the board in u-boot code.
https://github.com/mdrjr/5422_bootini/b ... #L172-L176

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 » Wed Oct 25, 2017 11:50 am

odroid wrote:USB driver seems to have an issue with warm-boot. :(
I've tried to reproduce the issue this morning.
I rebooted my XU4 board with a USB 3.0 SSD over 20 times. But I can't reproduce it. :(
I think my board was crazy last night. Let's ignore this issue until who will meet this issue again.

But I want to raise another issue about the sluggish slow desktop responsiveness. :P
Moving mouse cursor causes serious slowdown any video playback or graphics rendering.
Moving window is quite slow too. It must be related to the slow mouse cursor problem.
No such issue on Kernel 4.9.

I think @crashoverride's hardware acceleration patches seem to be missing even I'm not sure.
Did we miss something important from this great thread?
viewtopic.php?f=146&t=26248

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 11:52 am

odroid wrote:Thank you for the link.
But I don't like to add another DT file since XU4 DT works well with HC1. I already tested and confirmed the functionality.
If we add another DT, we need to change the boot.ini and make a logic to detect the board in u-boot code.
https://github.com/mdrjr/5422_bootini/b ... #L172-L176
I have rebased again the entire repo and moved this patch at the beginning of the odroid-specific patches. I will push these changes shortly.
This is because this patch alters the structure of DT a lot, and introduces exynos5422-odroid-core.dtsi that contains most of what was before in odroidxu3-common.dtsi.
I had to alter all the other patches to accomodate for this.
But I think this will make life easier in the future, if we want to add more samsung/mainline patches.

@odroid - if HC1 is working fine with the XU4 dtb then keep using it... you don't have to use the hc1 dtb :) but it's better to have it there for compatibility or future plans....

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 11:56 am

odroid wrote:
odroid wrote:USB driver seems to have an issue with warm-boot. :(
I've tried to reproduce the issue this morning.
I rebooted my XU4 board with a USB 3.0 SSD over 20 times. But I can't reproduce it. :(
I think my board was crazy last night. Let's ignore this issue until who will meet this issue again.

But I want to raise another issue about the sluggish slow desktop responsiveness. :P
Moving mouse cursor causes serious slowdown any video playback or graphics rendering.
Moving window is quite slow too. It must be related to the slow mouse cursor problem.
No such issue on Kernel 4.9.

I think @crashoverride's hardware acceleration patches seem to be missing even I'm not sure.
Did we miss something important from this great thread?
viewtopic.php?f=146&t=26248
good to see you could not reproduce USB3 :)
I am not sure what kernel patches were required for the mouse problem, I did not follow it :) Let me know if you find a kernel patch for this issue.
I've seen the problem, but only when you move the mouse. If you don't move the mouse, the performance is fine. So it probably has to do something with the hardware cursor....

EDIT: @odroid can you please test this patch: https://github.com/OtherCrashOverride/l ... 044da2c736

does armsoc/x11 somehow checks machine name for ODROID-XU3 instead of the default SAMSUNG EXYNOS (Flattened Device Tree)?

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 » Wed Oct 25, 2017 2:25 pm

I've tried it. But the mouse cursor is still quite lagging.
Brian is doublechecking it now.

I hope crashoverride join the party again once we publish our official github 4.14 branch with RC7 in early next week. :)

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 2:46 pm

thanks for testing @odroid

in the meantime i pushed again, rebased on top of samsung exynos drm and hdmi patches including hdmi sound.
i have left out the sound driver, as i want to test if the mainline exynos hdmi sound is working. if not, i will add again the hardkernel sound driver...

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 4:21 pm

I tested the HDMI sound, it did not work just with mainline.
So I am adding back the hardkernel driver.

Btw, if you try to compile the driver as a module, you get this error:

Code: Select all

In file included from sound/soc/samsung/odroid_max98090.c:10:0:
sound/soc/samsung/odroid_max98090.c:439:25: error: ‘samsung_max98090_of_match’ undeclared here (not in a function)
 MODULE_DEVICE_TABLE(of, samsung_max98090_of_match);
                         ^
./include/linux/module.h:212:15: note: in definition of macro ‘MODULE_DEVICE_TABLE’
 extern typeof(name) __mod_##type##__##name##_device_table  \
               ^
./include/linux/module.h:212:21: error: ‘__mod_of__samsung_max98090_of_match_device_table’ aliased to undefined symbol ‘samsung_max98090_of_match’
 extern typeof(name) __mod_##type##__##name##_device_table  \
                     ^
sound/soc/samsung/odroid_max98090.c:439:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
 MODULE_DEVICE_TABLE(of, samsung_max98090_of_match);
 ^
scripts/Makefile.build:313: recipe for target 'sound/soc/samsung/odroid_max98090.o' failed
make[3]: *** [sound/soc/samsung/odroid_max98090.o] Error 1
Any fix for that?

Also: on my XU4 I could not get sound on my TV over HDMI even with the HK driver even if the driver gets detected:

Code: Select all

[    4.709953] ALSA device list:
[    4.713596]   #0: odroid-snd
Have you checked sound on XU4 over HDMI? Can you please check that (again)? Is there a setting I must have?

If I want to set the sound output with alsa-mixer, I get this message: This sound device does not have any controls.

This is my alsa-info output: http://paste.debian.net/992652/

Thanks.

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 » Wed Oct 25, 2017 5:50 pm

I also have only one sound device. But the HDMI sound works with 4.14 rc6 now. I didn't apply mainline driver.

Code: Select all

odroid@odroid:~/odroidxu4-4.14.y$ aplay -l                                                                                         
**** List of PLAYBACK Hardware Devices ****                                                                                        
card 0: odroidsnd [odroid-snd], device 0: i2s0-sec dit-hifi-0 []                                                                   
  Subdevices: 0/1                                                                                                                  
  Subdevice #0: subdevice #0 
I'm using PulseAudio which is default in our official Ubuntu 16.04 image (ubuntu-16.04.3-4.9-mate-odroid-xu4-20170824.img)

The max98090 I2S driver has been used since we launched XU3 three years ago. XU3 had the sound codec on the board.
It is a source of HDMI sound generator even its architecture is weird. (badly hard-coded in somewhere).
This sound card for XU4 is using the same I2S driver. But we had to strengthen the I2S IO drive.
http://www.hardkernel.com/main/products ... 0067146391
I have no idea why it must be a built-in driver.

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 7:08 pm

Can you try following diff patch to fix this build issue.

Code: Select all

root@odroid:/usr/src/linux-memeka# git diff
diff --git a/sound/soc/samsung/odroid_max98090.c b/sound/soc/samsung/odroid_max98090.c
index ba5baa3..9455584 100644
--- a/sound/soc/samsung/odroid_max98090.c
+++ b/sound/soc/samsung/odroid_max98090.c
@@ -18,7 +18,7 @@
 #include <linux/of_gpio.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
-
+#include <linux/module.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -431,30 +431,23 @@ static int odroid_audio_remove(struct platform_device *pdev)
        return 0;
 }

-#ifdef CONFIG_OF
 static const struct of_device_id odroid_max98090_of_match[] = {
        { .compatible = "hardkernel,odroid-max98090", },
        {},
 };
-MODULE_DEVICE_TABLE(of, samsung_max98090_of_match);
-#endif /* CONFIG_OF */
+MODULE_DEVICE_TABLE(of, odroid_max98090_of_match);

 static struct platform_driver odroid_audio_driver = {
        .driver         = {
                .name   = "odroid-audio",
-               .owner  = THIS_MODULE,
-               .pm = &snd_soc_pm_ops,
-#ifdef CONFIG_OF
-               .of_match_table = of_match_ptr(odroid_max98090_of_match),
-#endif
+               .of_match_table = odroid_max98090_of_match,
+               .pm     = &snd_soc_pm_ops,
        },
        .probe          = odroid_audio_probe,
        .remove         = odroid_audio_remove,
 };
-
 module_platform_driver(odroid_audio_driver);

 MODULE_DESCRIPTION("ALSA SoC ODROID MAX98090");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:odroid-audio");

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 7:37 pm

@odroid

this is very strange. I cannot get sound on my XU4 on 4.14, but it works on 4.9 :(
can you please try again after my latest rebase? see if you can get sound on your image?

thanks!

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 » Wed Oct 25, 2017 8:07 pm

memeka wrote:does armsoc/x11 somehow checks machine name for ODROID-XU3 instead of the default SAMSUNG EXYNOS (Flattened Device Tree)?
I am not aware of any machine name checks in armsoc. There is likely a failure occurring due to KMS/DRM changes.
odroid wrote:I hope crashoverride join the party again once we publish our official github 4.14 branch with RC7 in early next week.
I do plan to participate once an official release is made.

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:00 pm

moon.linux wrote:Can you try following diff patch to fix this build issue.

Code: Select all

root@odroid:/usr/src/linux-memeka# git diff
diff --git a/sound/soc/samsung/odroid_max98090.c b/sound/soc/samsung/odroid_max98090.c
index ba5baa3..9455584 100644
--- a/sound/soc/samsung/odroid_max98090.c
+++ b/sound/soc/samsung/odroid_max98090.c
@@ -18,7 +18,7 @@
 #include <linux/of_gpio.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
-
+#include <linux/module.h>
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -431,30 +431,23 @@ static int odroid_audio_remove(struct platform_device *pdev)
        return 0;
 }

-#ifdef CONFIG_OF
 static const struct of_device_id odroid_max98090_of_match[] = {
        { .compatible = "hardkernel,odroid-max98090", },
        {},
 };
-MODULE_DEVICE_TABLE(of, samsung_max98090_of_match);
-#endif /* CONFIG_OF */
+MODULE_DEVICE_TABLE(of, odroid_max98090_of_match);

 static struct platform_driver odroid_audio_driver = {
        .driver         = {
                .name   = "odroid-audio",
-               .owner  = THIS_MODULE,
-               .pm = &snd_soc_pm_ops,
-#ifdef CONFIG_OF
-               .of_match_table = of_match_ptr(odroid_max98090_of_match),
-#endif
+               .of_match_table = odroid_max98090_of_match,
+               .pm     = &snd_soc_pm_ops,
        },
        .probe          = odroid_audio_probe,
        .remove         = odroid_audio_remove,
 };
-
 module_platform_driver(odroid_audio_driver);

 MODULE_DESCRIPTION("ALSA SoC ODROID MAX98090");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:odroid-audio");
Thanks yes now it compiles as a module...
However sound still does not work for me, even if sound card is recognized, and pavucontrol even moves its volume bars in sync with some playing music... it's very weird, I'll try re-compiling my kernel from scratch :(

Post Reply

Return to “Linux Kernel 4.14 Debugging Party”

Who is online

Users browsing this forum: No registered users and 1 guest