Kernel 6.6+ Support

Talking about OS and emulation core development
Post Reply
spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Kernel 6.6+ Support

Post by spycat »

Hello,

I have been trying to bring up the OGU on Kernel 6.6/linux-next for some time now for JELOS but have hit a bit of a roadblock.

I have been using Neils v9 Amlogic DSI patch set https://lore.kernel.org/linux-amlogic/3 ... inaro.org/

Along with the panel driver and device-tree changes from @mdrjr that are currently used in the HK 6.1 kernel, from examination I can also see that the DSI support in this kernel is based on Neils v5 patch set.

I get backlight but the image is garbled and the colour space also looks to be incorrect, an example can be seen here.

Any help that can be provided to push this over the line would be appreciated.

The following links is what I have been using to bring up the OGU on 6.6.
https://github.com/adamg88/distribution ... e6638bab0a
https://raw.githubusercontent.com/adamg ... -dts.patch
https://raw.githubusercontent.com/adamg ... temp.patch
Last edited by spycat on Tue Jan 09, 2024 5:32 am, edited 1 time in total.
These users thanked the author spycat for the post:
fewt (Tue Jan 09, 2024 1:32 am)

User avatar
odroid
Site Admin
Posts: 42297
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3648 times
Been thanked: 2016 times
Contact:

Re: Kernel 6.6+ Support

Post by odroid »

@mdrjr,
Can you please look into the Kernel 6.6 MIPI DSI driver itself or the MIPI clock driver?
Since Kernel 6.6 seems to be an official LTS Kernel, it is worth to check the MIPI functonality.
https://www.kernel.org/category/releases.html
These users thanked the author odroid for the post:
fewt (Tue Jan 09, 2024 1:32 am)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

I will start moving from 6.1 to 6.6 for Go Ultra.
These users thanked the author mdrjr for the post:
fewt (Tue Jan 09, 2024 1:27 am)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Btw, what Neil's patchs you applied on top of 6.6 ?
I'm seeing here that 6.6 already has the DSI drivers merged.

Are you talking about just the dts patchs and the panel update?

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

mdrjr wrote:
Tue Jan 09, 2024 4:17 am
I'm seeing here that 6.6 already has the DSI drivers merged.
I'm not sure where you are looking but this is not the case? the v9 patch set which is Neils latest has not been merged into the 6.6 branch. I linked in my first post the patches I was using however I have applied all of the patches on top of a clean 6.6.10 for ease of reference available here.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Thanks for that! It helps a lot.

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

Re: Kernel 6.6+ Support

Post by crashoverride »

Looking forward to this. Please post a link once the kernel is usable with vendor Mali drivers. I will update the testing image to use it.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

I have tried r47 of the mali driver against 6.6+ already and could not get it to compile cleanly. Panfrost works fine however as I have been using this on an ODROID-N2+.

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

Re: Kernel 6.6+ Support

Post by crashoverride »

spycat wrote:
Wed Jan 10, 2024 6:42 am
Panfrost works fine
The key component that only vendor Mali provides is Vulkan. It is a game changer (no pun intended)! The testing with the previous 6.x kernel and vendor Mali + Vulkan yielded performance beyond my expectations (see Dolphin aka Game Cube). However, it also crashed a lot making it unsuitable for production. ;)

My hope is that kernel 6.6 and recent Mali driver offers enough stability for an official release.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

crashoverride wrote:
Thu Jan 11, 2024 6:26 pm
The key component that only vendor Mali provides is Vulkan. It is a game changer (no pun intended)!
I'm aware of this as this is what we currently use in JELOS. Myself and others have done extensive testing of both Mali and Panfrost drivers.

I believe however the focus should be fixing the main issue at hand and then vendor Mali can be looked at later, Vulkan is useless without a usable display. :D

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

Re: Kernel 6.6+ Support

Post by crashoverride »

spycat wrote:
Thu Jan 11, 2024 7:09 pm
Vulkan is useless without a usable display.
... hold my beer!

Fun Fact: Early samples of the ODROID GO Advance did not have a working display. I did the early software bring-up entirely based on telemetry from the device.

Although the lack of video encoder support in mainline 6.x prevents me from doing h264 streaming as was done with OGA/OGS, I would bet I could dedicate a 'little' core to MJPEG software encoding and achieve comparable results.

Therefore, I think its better stated as "not practical" than "useless".

I hope this post made you laugh, @rooted and @mad_ady.

User avatar
mad_ady
Posts: 11988
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 662 times
Been thanked: 1280 times
Contact:

Re: Kernel 6.6+ Support

Post by mad_ady »

You forgot to mention that all development was done via green-on-black teletype attached over serial!
These users thanked the author mad_ady for the post:
odroid (Fri Jan 12, 2024 9:18 am)

User avatar
rooted
Posts: 10612
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 821 times
Been thanked: 733 times
Contact:

Re: Kernel 6.6+ Support

Post by rooted »

Nothing like working 'blind' to get creative :)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Status update:

I can now read the console text clearly.
However the green background still there.....
These users thanked the author mdrjr for the post (total 2):
odroid (Tue Jan 16, 2024 9:59 am) • spycat (Tue Jan 16, 2024 10:01 pm)

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

That's great that your making progress, I have tried your patch here but the text is still garbled for me unless I am missing something else as well?

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Hi, this is not what fixes some issues, I will try to clean up and release the green background code mid this week.
My kernel tree is beyond ugly right now with tons of debug messages.
These users thanked the author mdrjr for the post (total 2):
spycat (Tue Jan 23, 2024 12:19 am) • brooksytech (Tue Jan 23, 2024 12:29 am)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

In case anyone wants to have fun... https://github.com/mdrjr/linux/commit/f ... f471af6e4d

Its all green! But text is readable!
These users thanked the author mdrjr for the post:
spycat (Tue Jan 23, 2024 12:53 pm)

brooksytech
Posts: 101
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 23 times
Been thanked: 85 times
Contact:

Re: Kernel 6.6+ Support

Post by brooksytech »

Im pretty sure I saw some patches submitted for upstream related to this.

https://git.kernel.org/pub/scm/linux/ke ... dbe7a49aec

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

mdrjr wrote:
Tue Jan 23, 2024 4:24 am
In case anyone wants to have fun... https://github.com/mdrjr/linux/commit/f ... f471af6e4d

Its all green! But text is readable!
Hi @mdrjr

I have just tried this patch but there is still no change in the text, it is still a garbled mess. Are you able to post your linux config in-case I'm missing something there?

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

spycat wrote:
Tue Jan 23, 2024 1:08 pm
mdrjr wrote:
Tue Jan 23, 2024 4:24 am
In case anyone wants to have fun... https://github.com/mdrjr/linux/commit/f ... f471af6e4d

Its all green! But text is readable!
Hi @mdrjr

I have just tried this patch but there is still no change in the text, it is still a garbled mess. Are you able to post your linux config in-case I'm missing something there?
I believe I missed something to commit, you can try today changes I've made.
WhatsApp Image 2024-01-23 at 15.26.46.jpeg
WhatsApp Image 2024-01-23 at 15.26.46.jpeg (277.62 KiB) Viewed 1885 times
These users thanked the author mdrjr for the post:
spycat (Wed Jan 24, 2024 8:05 am)

brooksytech
Posts: 101
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 23 times
Been thanked: 85 times
Contact:

Re: Kernel 6.6+ Support

Post by brooksytech »

@mdrjr Looks to me like you are using BSP u-boot without the patches you helped us create to remove the video init.

These changes should fix that:
https://github.com/hardkernel/u-boot/co ... U-v2015.01

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

Hi @mdrjr

Thanks for posting the missing piece of the puzzle. It finally all works now. :D

You was missing this commit as well.

Code: Select all

Author: Neil Armstrong <neil.armstrong@linaro.org>
Date:   Tue Nov 14 11:14:43 2023 +0100

    dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids

    Add MIPI ISP & CSI PHY clock ids to G12A clock bindings header

    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Acked-by: Conor Dooley <conor.dooley@microchip.com>
Colours are correct for me but I am using mainline u-boot.
Attachments
20240123_224841.png
20240123_224841.png (525.42 KiB) Viewed 1872 times

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

brooksytech wrote:
Wed Jan 24, 2024 7:53 am
@mdrjr Looks to me like you are using BSP u-boot without the patches you helped us create to remove the video init.

These changes should fix that:
https://github.com/hardkernel/u-boot/co ... U-v2015.01
Just checked and I'm using the correct u-boot....
For a second I tought I had it missing, but yeah, I still have green screen with 2015.01 u-boot.


btw any patches or any tree I can look for your upstream u-boot I would like to test it on my side.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

You can test the following u-boot.bin, this is based on mainline u-boot v2023.10 with no changes.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

I have cleaned everything up and rebased on top of 6.6.13, repo available here.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Does this u-boot reads boot.ini (our format) or requires boot.scr style?

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

No it doesn't read boot.ini, it uses extlinux.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Tested with U-Boot 2023.10 (Jan 23 2024 - 04:02:12 +0000) odroid-go-ultra
And I have the green screen...

Now I'm confused! I might be missing something on defconfig ?

Can you guys share the defconfig you are using ?

brooksytech
Posts: 101
Joined: Thu Oct 27, 2022 2:37 am
languages_spoken: english
Has thanked: 23 times
Been thanked: 85 times
Contact:

Re: Kernel 6.6+ Support

Post by brooksytech »

mdrjr wrote:
Wed Jan 24, 2024 10:27 pm
Tested with U-Boot 2023.10 (Jan 23 2024 - 04:02:12 +0000) odroid-go-ultra
And I have the green screen...

Now I'm confused! I might be missing something on defconfig ?

Can you guys share the defconfig you are using ?
https://github.com/adamg88/distribution ... rch64.conf

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Yep, it was the defconfig.. now of to find what exactly caused it.
These users thanked the author mdrjr for the post:
brooksytech (Thu Jan 25, 2024 6:54 am)

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

Just an update r47p0 mali driver is working with 6.6.13. So we have vulkan :)
These users thanked the author spycat for the post:
brooksytech (Fri Jan 26, 2024 12:10 am)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

I'm preparing all the changes that we normally do to update all our images to 6.6
These users thanked the author mdrjr for the post:
brooksytech (Fri Jan 26, 2024 12:10 am)

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

The only issue we seem to have with it now is the RK818 charger driver, we're unable to pull battery % as a result.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

I will take a look at this tomorrow, today I'm focusing on XU4 support and tomorrow I can take a look at the battery charger driver.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

Done, I've made all the changes for the charger/battery work.

Everything from: 87cff369a7114cf993040022b426c28adec9aa6b
To
5729cb0916feb3202d73c27e43c02c082eeeb133

is needed :)
These users thanked the author mdrjr for the post (total 2):
spycat (Thu Feb 01, 2024 6:05 am) • notime2d8 (Thu Feb 01, 2024 3:20 pm)

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

Hi @mdrjr

Brilliant! I can confirm the charger/battery patches work.

The last remaining issue we are having now is the sound quality, it seems tinny, odd and out of phase. I am using your "ODROID-GO Ultra: Limit the volume to prevent clipping of output signal." patch but it doesn't appear to have made any difference.

Thanks for everything so far.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

I will take a look and test sound :)
These users thanked the author mdrjr for the post:
spycat (Fri Feb 02, 2024 3:07 am)

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

These users thanked the author mdrjr for the post:
spycat (Fri Feb 02, 2024 4:40 am)

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

I can confirm those changes work perfectly.

We have now bumped the Linux kernel in JELOS to 6.6, thanks for all your help, we couldn't of done it without you <3.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

Just a heads up @mdrjr there is a new v10 DSI patch set and Neil has incorporated your changes into it, I have tested on v6.8-rc3 and everything is working. Working tree for anyone interested here.
These users thanked the author spycat for the post:
odroid (Wed Feb 07, 2024 9:57 am)

allanmac
Posts: 27
Joined: Mon May 04, 2020 2:00 am
languages_spoken: english
ODROIDs: N2
Location: South Florida, USA
Has thanked: 19 times
Been thanked: 11 times
Contact:

Re: Kernel 6.6+ Support

Post by allanmac »

spycat wrote:
Thu Jan 25, 2024 9:14 am
Just an update r47p0 mali driver is working with 6.6.13. So we have vulkan :)
Awesome!

FWIW, do you mean the R47 kernel driver?

I only see the R46 user space driver on the mali site.

We can ping ARM to update the user space driver to R47.

spycat
Posts: 18
Joined: Sat Oct 14, 2023 1:00 am
languages_spoken: english
ODROIDs: N2/N2+/C4/OGU
Has thanked: 8 times
Been thanked: 7 times
Contact:

Re: Kernel 6.6+ Support

Post by spycat »

allanmac wrote:
Sat Feb 17, 2024 2:31 am
I only see the R46 user space driver on the mali site.
That is the mali binary blob, the mali driver is on the page next to it, link.

GinKage
Posts: 13
Joined: Tue Nov 01, 2022 7:28 am
languages_spoken: english
ODROIDs: N2+, GO-Ultra
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Kernel 6.6+ Support

Post by GinKage »

On a related note, there's now also R48 kernel driver.

mdrjr
Site Admin
Posts: 12101
Joined: Fri Feb 22, 2013 11:34 pm
languages_spoken: english, portuguese
ODROIDs: -
Location: Brazil
Has thanked: 8 times
Been thanked: 153 times
Contact:

Re: Kernel 6.6+ Support

Post by mdrjr »

GinKage wrote:
Tue Mar 05, 2024 4:36 am
On a related note, there's now also R48 kernel driver.
99% of the time, kernel drivers doesn't do anything for Mali.
Its only changes to support newer kernel versions.

What actually matters is the binary driver.

Btw, the binary driver is smart enough to let you know, you need to update the kernel driver in case you need to do so.

Post Reply

Return to “Platform development”

Who is online

Users browsing this forum: No registered users and 1 guest