Panfrost Status on Odroid N2

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Panfrost Status on Odroid N2

Post by jgmdev »

Updated: mali driver isn't needed for panfrost support.

The idea of this post is to track the status of the Panfrost GPU driver as instructions on how to enable it for experimentation.

I will start by sharing some #panfrost irc conversation logs which seem to have some useful information and extracting/interpreting what I think are the most important details, I may be omitting important information so please read the logs too:

July 20 2020
https://freenode.irclog.whitequark.org/ ... 2020-07-20

It seems that panfrost developers where using this mali kernel driver as a reference for development https://github.com/LibreELEC/mali-bifro ... 6p0-01rel0 which as the conversation states needs the following changes:

Code: Select all

diff --git a/config.meson-g12a b/config.meson-g12a
index b9d5e35..83de268 100644
--- a/config.meson-g12a
+++ b/config.meson-g12a
@@ -1,3 +1,2 @@
 MALI_MIDGARD=m
-MALI_PLATFORM_NAME=meson
-MALI_PLATFORM_POWER_DOWN_ONLY=y
+MALI_PLATFORM_NAME=devicetree
diff --git a/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c b/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
index b3b5ffc..2d0638b 100644
--- a/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
+++ b/driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase_mem_linux.c
@@ -2417,7 +2417,7 @@ void kbasep_os_process_page_usage_update(struct kbase_context *kctx, int pages)
 	if (mm) {
 		atomic_add(pages, &kctx->nonmapped_pages);
 #ifdef SPLIT_RSS_COUNTING
-		add_mm_counter(mm, MM_FILEPAGES, pages);
+		/*add_mm_counter(mm, MM_FILEPAGES, pages);*/
 #else
 		spin_lock(&mm->page_table_lock);
 		add_mm_counter(mm, MM_FILEPAGES, pages);
@@ -2445,7 +2445,7 @@ static void kbasep_os_process_page_usage_drain(struct kbase_context *kctx)
 
 	pages = atomic_xchg(&kctx->nonmapped_pages, 0);
 #ifdef SPLIT_RSS_COUNTING
-	add_mm_counter(mm, MM_FILEPAGES, -pages);
+	/*add_mm_counter(mm, MM_FILEPAGES, -pages);*/
 #else
 	spin_lock(&mm->page_table_lock);
 	add_mm_counter(mm, MM_FILEPAGES, -pages);
 
To compile it you would do it as:

Code: Select all

make ARCH=arm64 CONFIG_NAME=config.meson-g12a -j 6
Note: it seems to only compile on kernels < 5.8

To load it into the kernel you can do:

Code: Select all

sudo insmod driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko
Or if I recall correctly copy it to /lib/modules/5.X.X.X/extramodules/ (replacing .X.X.X with proper kernel version)

Code: Select all

sudo cp driver/product/kernel/drivers/gpu/arm/midgard/mali_kbase.ko /lib/modules/5.X.X.X/extramodules/ 
Re-scan kernel drivers:

Code: Select all

sudo depmod
Load it as usual

Code: Select all

sudo modprobe mali_kbase
To unload it:

Code: Select all

sudo rmmod mali_kbase
or
sudo modprobe -r mali_kbase
Important: Before trying out the panfrost kernel driver uninstall the mali one because it conflicts.

July 23 2020
https://freenode.irclog.whitequark.org/ ... 2020-07-20

For panfrost to work with the Bifrost cpu found on the Odroid N2 it has to be enabled on the kernel sources with the changes found on the following repo and branch: https://github.com/superna9999/linux/co ... st-bifrost These changes enable Bifrost GPU's (G31 Odroid C4 and G52 Odroid N2) on the panfrost kernel driver and apply some workarounds to what seems to be some quirks on the G52 GPU for proper initialization.

For the patches already as files and an example of applying those changes on the kernel can be found here:
https://github.com/jgmdev/archlinux-odr ... roid-n2-57

After building the patched kernel you can run sudo dmesg | grep panfrost after a reboot and should get something like:

Code: Select all

[   10.021359] panfrost ffe40000.gpu: clock rate = 799999987
[   10.039178] panfrost ffe40000.gpu: supply mali not found, using dummy regulator
[   10.045103] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[   10.052716] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[   10.069198] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[   10.083122] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[   10.092876] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 1
If you don't get that output remember to uninstall the mali kernel driver and reboot again. The mali kernel driver is not needed to use the panfrost one!

Mesa Bits

Since Bifrost support is still experimental, you will need to compile mesa from git which has latest panfrost changes/enablement for bifrost and also add an environment variable in your system:

Code: Select all

# echo PAN_MESA_DEBUG=bifrost >> /etc/environment
After all of this glxinfo -B would still report llvmpipe instead of panfrost because as I understood on the irc logs it seems that some other enablement should take place for the G52 GPU on the Odroid N2. For the G31 GPU found on the Odroid C4 all the discussed changes may give you panfrost support.

Current Conclusion

The panfrost driver still doesn't works on the Odroid N2 but it seems that enablement of it is in process since the Bifrost G52 GPU works a bit different to the G31 found on the Odroid C4.

If someone on the forums or outside the forums knows something else please share it on this thread to keep us updated.
Last edited by jgmdev on Mon Oct 12, 2020 3:45 pm, edited 2 times in total.
These users thanked the author jgmdev for the post:
odroidn2user (Thu Aug 20, 2020 3:32 pm)

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

Re: Panfrost Status on Odroid N2

Post by odroid »

Moved from C4 sub-forum.
These users thanked the author odroid for the post:
jgmdev (Thu Aug 20, 2020 9:25 am)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

Thank you for pulling this information together !

I wonder if there has been any progress on Panfrost for Odroid N2 in the past weeks...

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

I have been working in other stuff so would need to inspect the irc logs since last time I did. But... there are great news! With the acquisition of ARM from nvidia it seems that now ARM is financing Panfrost development which only means great news for us! The reverse engineering that panfrost developers where doing may now turn into official development since ARM may share with with them the technical documentation to properly develop the driver!

Phoronix covered the great news in detail:
https://www.phoronix.com/scan.php?page= ... g-Official
These users thanked the author jgmdev for the post (total 2):
harddroid (Thu Sep 17, 2020 6:21 pm) • odroidn2user (Sat Sep 19, 2020 10:03 pm)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

I had seen that as I was following the talk at XDC 2020.
Let us hope that indeed we can see a Panfrost driver for Odroid N2 surfacing soon.

In the hope this can be helpful, here are the mesa compilation optimization settings I gathered from the panfrost discussion threads:

"--buildtype=release" "-Doptimization=3" "-Ddebug=false" "-Db_ndebug=true" "-Dstrip=true" "-Dzstd=true" and enable LTO: "-Db_lto=true"
These users thanked the author deuteragenie for the post:
jgmdev (Fri Sep 18, 2020 3:52 am)

wallyz21
Posts: 167
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 17 times
Contact:

Re: Panfrost Status on Odroid N2

Post by wallyz21 »

Arm are worried that their GPU technology will disappear in favor of another companies GPU tech.

I have no doubt that the GPU of choice for Arm SOC going into the future will be NVIDIA. It is a very smart move to capture the mobile GPU market share.

You see at the moment the GPU tech used in Arm socs has been open market. Everyone has been trying to get in. Amd are trying with Samsung. The major Arm manufacturers each have their own GPU. Now nVidia are in. The only one out is Intel!

Arm (core) would obviously like to retain and continue development of their tech but I think it is now too late, the writing is on the wall!!!
Walter Zambotti
N2 - Ubuntu Mate Desktop

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

wallyz21 wrote:
Sat Sep 19, 2020 1:24 pm
I have no doubt that the GPU of choice for Arm SOC going into the future will be NVIDIA. It is a very smart move to capture the mobile GPU market share.
If we take into consideration the Jetson development boards it could mean that prices of arm hardware with nvidia tech would skyrocket even if cpu isnt that powerful.

Sav
Posts: 213
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 57 times
Been thanked: 21 times
Contact:

Re: Panfrost Status on Odroid N2

Post by Sav »

These users thanked the author Sav for the post (total 3):
jgmdev (Tue Sep 22, 2020 10:54 pm) • superpowter77 (Wed Sep 23, 2020 12:39 am) • odroidn2user (Wed Sep 23, 2020 2:03 pm)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Whoaaa! Time for giving the 5.10 kernel a compile :D
These users thanked the author jgmdev for the post (total 2):
superpowter77 (Wed Sep 23, 2020 12:38 am) • deuteragenie (Wed Sep 23, 2020 5:01 pm)

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

jgmdev wrote:
Tue Sep 22, 2020 10:55 pm
Whoaaa! Time for giving the 5.10 kernel a compile :D
We might have to wait until next month for it to be merged and 5.10 to become available but I'm very interested to see how it "pans"out :)
These users thanked the author brad for the post (total 2):
jgmdev (Wed Sep 23, 2020 11:38 am) • odroidn2user (Wed Sep 23, 2020 2:03 pm)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

To recompile MESA for Panfrost, the following arguments can/should be used:

-Dplatforms=wayland,x11 -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dllvm=false

This is in addition to the following compilation optimization:

"--buildtype=release" "-Doptimization=3" "-Ddebug=false" "-Db_ndebug=true" "-Dstrip=true" "-Dzstd=true" and enable LTO: "-Db_lto=true"
These users thanked the author deuteragenie for the post (total 2):
harddroid (Wed Sep 30, 2020 5:51 pm) • jgmdev (Thu Oct 01, 2020 5:58 am)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

Ive tried to compile it on the 5.8.12 tobetter kernel and this is the result:

Code: Select all

OpenGL vendor string:                   Panfrost
OpenGL renderer string:                 Mali G52 (Panfrost)
OpenGL version string:                  1.4 Mesa 20.3.0-devel (git-ae7975ecd4)
OpenGL shading language version string: 1.20
Driver:                                 Unknown
GPU class:                              Unknown
OpenGL version:                         1.4
GLSL version:                           1.20
Mesa version:                           20.3
Linux kernel version:                   5.8.12
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
But glxgears does not work on weston with fbdev-backend (drm-backend gives me a signal loss on my monitor).
These users thanked the author harddroid for the post:
jgmdev (Thu Oct 01, 2020 5:57 am)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

harddroid wrote:
Wed Sep 30, 2020 7:17 pm
Ive tried to compile it on the 5.8.12 tobetter kernel and this is the result:
See top post. Some patches need to be applied to the 5.8 kernel.

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

deuteragenie wrote:
Wed Sep 30, 2020 5:21 pm
To recompile MESA for Panfrost, the following arguments can/should be used:
Where are we at now, wayland, x11, gnome?

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

I believe wayland + gnome is the preferred option for the moment.

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

deuteragenie wrote:
Wed Sep 30, 2020 8:23 pm
harddroid wrote:
Wed Sep 30, 2020 7:17 pm
Ive tried to compile it on the 5.8.12 tobetter kernel and this is the result:
See top post. Some patches need to be applied to the 5.8 kernel.
I did apply some patches to the kernel. You can see them here:

https://github.com/astralaster/archlinu ... roid-n2-58

But they dont look exactly the same as the ones from here: https://github.com/superna9999/linux/co ... st-bifrost

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

deuteragenie wrote:
Wed Sep 30, 2020 10:47 pm
I believe wayland + gnome is the preferred option for the moment.
ok I must do some some comparisons then with gnome / wayland and amlogic blobs / panfrost and report back to alyssa. I'm very proud of the achievements of her and the panfrost team for the userspace developments they have made recently :) Also very proud of mainline kernel developers and Baylibre for their efforts on the kernel side and the video decoder. tobetter and the others in the odroid community for getting gnome working with wayland and the amlogic blobs and also hats off to Christian for the work on LibreELEC and kodi which is getting widespread usage :) We have choices and the future is looking very bright for Odroid devices no matter what choices are made!
These users thanked the author brad for the post (total 4):
istanbulls (Thu Oct 01, 2020 1:18 am) • deuteragenie (Thu Oct 01, 2020 2:37 am) • odroidn2user (Thu Oct 01, 2020 4:46 am) • jgmdev (Thu Oct 01, 2020 5:59 am)

odroidn2user
Posts: 336
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 96 times
Been thanked: 89 times
Contact:

Re: Panfrost Status on Odroid N2

Post by odroidn2user »

brad wrote:
Thu Oct 01, 2020 1:09 am
ok I must do some some comparisons then with gnome / wayland and amlogic blobs / panfrost and report back to alyssa. I'm very proud of the achievements of her and the panfrost team for the userspace developments they have made recently :) Also very proud of mainline kernel developers and Baylibre for their efforts on the kernel side and the video decoder. tobetter and the others in the odroid community for getting gnome working with wayland and the amlogic blobs and also hats off to Christian for the work on LibreELEC and kodi which is getting widespread usage :) We have choices and the future is looking very bright for Odroid devices no matter what choices are made!
This. Exactly this!
Oh yes. Wonderful developments, great people doing awesome stuff, sharing their results with us all... Magic!

(There are a few remaining driver issues though, but man... looking bright indeed!)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

I just noticed that Neil Armstrong has another branch of the panfrost patches based on linux 5.9 and with more fixes/patches than the one I shared on the first post :D

https://github.com/superna9999/linux/tr ... st-bifrost
These users thanked the author jgmdev for the post (total 2):
deuteragenie (Thu Oct 01, 2020 5:06 pm) • harddroid (Thu Oct 01, 2020 6:20 pm)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

jgmdev wrote:
Thu Oct 01, 2020 7:15 am
I just noticed that Neil Armstrong has another branch of the panfrost patches based on linux 5.9 and with more fixes/patches than the one I shared on the first post :D

https://github.com/superna9999/linux/tr ... st-bifrost
Here you can download a patched 5.9rc6 kernel based on tobetter: https://drive.google.com/drive/folders/ ... sp=sharing
I only patched the drivers/gpu/drm/panfrost path. You can get the PKGBUILD etc here: https://github.com/astralaster/archlinu ... roid-n2-59
Some dmesg

Code: Select all

[    7.184537] panfrost ffe40000.gpu: clock rate = 24000000
[    7.191143] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[    7.192012] rc rc0: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0
[    7.199338] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[    7.205953] rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter
[    7.213470] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[    7.223043] input: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/input0
[    7.230770] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[    7.230775] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[    7.231921] panfrost ffe40000.gpu: error powering up gpu L2
[    7.239435] libphy: mdio_mux: probed
[    7.243135] meson-ir ff808000.ir: receiver initialized
[    7.251838] panfrost ffe40000.gpu: error powering up gpu shader
Trying weston with drm-backend results in:

Code: Select all

[   69.174333] panfrost ffe40000.gpu: error powering up gpu shader
And hdmi is very unstable with 5.9 and my setup.

//EDIT
I think its not sufficient to patch the gpu/drm/panfrost path only. :roll:
These users thanked the author harddroid for the post:
jgmdev (Fri Oct 02, 2020 12:28 am)

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

harddroid wrote:
Thu Oct 01, 2020 10:31 pm
Some dmesg

Code: Select all

[    7.184537] panfrost ffe40000.gpu: clock rate = 24000000
[    7.191143] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[    7.192012] rc rc0: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0
[    7.199338] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[    7.205953] rc rc0: lirc_dev: driver meson-ir registered at minor = 0, raw IR receiver, no transmitter
[    7.213470] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[    7.223043] input: meson-ir as /devices/platform/soc/ff800000.bus/ff808000.ir/rc/rc0/input0
[    7.230770] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[    7.230775] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[    7.231921] panfrost ffe40000.gpu: error powering up gpu L2
[    7.239435] libphy: mdio_mux: probed
[    7.243135] meson-ir ff808000.ir: receiver initialized
[    7.251838] panfrost ffe40000.gpu: error powering up gpu shader
Trying weston with drm-backend results in:

Code: Select all

[   69.174333] panfrost ffe40000.gpu: error powering up gpu shader
And hdmi is very unstable with 5.9 and my setup.

//EDIT
I think its not sufficient to patch the gpu/drm/panfrost path only. :roll:
Those errors are known by the panfrost team / kernel developers and being worked on but don't believe they are fatal.

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

brad wrote:
Fri Oct 02, 2020 12:08 am
Those errors are known by the panfrost team / kernel developers and being worked on but don't believe they are fatal.
Where do you get this info from? On their gitlab there are no issues about those errors: https://gitlab.freedesktop.org/groups/panfrost/-/issues

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

I did a kernel build with this sources: https://github.com/superna9999/linux/tr ... st-bifrost and weston with drm does start now with much image errors (parts of the image get black and need to be rerendered) and GLX does not work. But atleast drm is working already.

Code: Select all

[    8.707807] panfrost ffe40000.gpu: clock rate = 24000000
[    8.712502] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[    8.721597] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[    8.728298] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[    8.736407] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[    8.751670] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[    8.759129] panfrost ffe40000.gpu: error powering up gpu L2
[    8.764867] panfrost ffe40000.gpu: error powering up gpu shader
[    8.770509] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 1
//EDIT
I did test supertux2 with wayland it does 45fps-60fps. So its working already.
These users thanked the author harddroid for the post (total 3):
deuteragenie (Fri Oct 02, 2020 1:53 am) • odroidn2user (Sat Oct 03, 2020 4:04 am) • Sav (Sat Oct 03, 2020 7:23 am)

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

harddroid wrote:
Fri Oct 02, 2020 12:25 am
brad wrote:
Fri Oct 02, 2020 12:08 am
Those errors are known by the panfrost team / kernel developers and being worked on but don't believe they are fatal.
Where do you get this info from? On their gitlab there are no issues about those errors: https://gitlab.freedesktop.org/groups/panfrost/-/issues
In the #panfrost IRC channel https://freenode.irclog.whitequark.org/ ... 2020-09-23
These users thanked the author brad for the post:
harddroid (Fri Oct 02, 2020 1:06 am)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

harddroid wrote:
Fri Oct 02, 2020 12:51 am
I did test supertux2 with wayland it does 45fps-60fps. So its working already.
Fantastic news ! As Panfrost is OpenGL compatible, it probably means a number of OpenGL only games are working, or are very close to working.
Also X11 with Glamor should be very very close.

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

Ive also tried openarena and it did not work. Both use sdl and I did configure wayland as renderer. To change the sdl renderer to wayland interface, just start supertux2 like this:

Code: Select all

SDL_VIDEODRIVER=wayland supertux2
. Ive uploaded the kernel packages at https://drive.google.com/drive/folders/ ... sp=sharing if you want to try it. There is also my fork of jgmdevs git repo with a PKGBUILD: https://github.com/astralaster/archlinu ... roid-n2-59

I cant wait for the next update of this driver. :)
These users thanked the author harddroid for the post (total 3):
deuteragenie (Sat Oct 03, 2020 9:14 pm) • brad (Sun Oct 04, 2020 12:12 am) • jgmdev (Sun Oct 04, 2020 10:00 am)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

You probably can / should remove 01-panfrost.patch from that Git folder...

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

deuteragenie wrote:
Sat Oct 03, 2020 9:14 pm
You probably can / should remove 01-panfrost.patch from that Git folder...
You are right. That testing branch is not so clean. Its a modified version of tobetters base with panfrost patches. But the 01-panfrost.patch wont get applied currently and it should work as is. :) Im not sure weather we need more updates on mesa or the kernel driver or both.

//EDIT
Ive cleaned the repo and renamed it to superna9999 to show its no longer based on tobetters sources: https://github.com/astralaster/archlinu ... rna9999-59

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

From the October 5 2020 IRC LOG:

Developer Tomeu Vizoso is working on a linux 5.9 branch to fix gpu faulting, git repo and tree:

https://gitlab.freedesktop.org/tomeu/li ... r-mesa-ci/
These users thanked the author jgmdev for the post (total 3):
harddroid (Wed Oct 07, 2020 8:24 pm) • superpowter77 (Wed Oct 07, 2020 11:59 pm) • deuteragenie (Thu Oct 08, 2020 4:22 am)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

More progress :

https://freenode.irclog.whitequark.org/ ... 2020-10-07

17:31 <archetech> got my N2+ running plasma wayland on panfrost/5.9 kernel :)
17:32 <archetech> thanks for effort
17:40 <nhp[m]> ah cool, how does it perform?
17:43 <macc24> bifrost?
17:45 <HdkR> That would be Bifrost
17:47 <macc24> :o
17:49 <archetech> performs well snappy and sharp
17:49 <alyssa> does it? :o
17:49 <alyssa> Bifrost has had less than 0 work on performance so far
17:49 <macc24> my bifrost board hangs for no reason after enabling it to scale cpu frequency (:
17:50 <HdkR> Negative work on performance is always fun
17:50 <archetech> kernel: panfrost ffe40000.gpu: error powering up gpu shader logs every second
17:51 <archetech> plasma crashes on exit bad but thats probably not the driver
17:52 <archetech> manjaro is the distro its not them its qt/plasma on wayland arm my guess
These users thanked the author deuteragenie for the post (total 3):
harddroid (Thu Oct 08, 2020 6:51 am) • jgmdev (Thu Oct 08, 2020 10:23 am) • Luke.go (Thu Oct 08, 2020 11:00 am)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

jgmdev wrote:
Wed Oct 07, 2020 6:46 pm
From the October 5 2020 IRC LOG:

Developer Tomeu Vizoso is working on a linux 5.9 branch to fix gpu faulting, git repo and tree:

https://gitlab.freedesktop.org/tomeu/li ... r-mesa-ci/
Ive build it for arch. You can download it here: https://drive.google.com/drive/folders/ ... sp=sharing
In the IRC they said you need current mesa for fixes to run plasma desktop.
These users thanked the author harddroid for the post:
jgmdev (Fri Oct 09, 2020 4:19 am)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

harddroid wrote:
Thu Oct 08, 2020 8:34 pm
Ive build it for arch. You can download it here: https://drive.google.com/drive/folders/ ... sp=sharing
In the IRC they said you need current mesa for fixes to run plasma desktop.
I just tested the kernel you shared with a recent build of the mesa-arm-git PKGBUILD you put together and got the following on dmesg regarding the panfrost kernel driver:

Code: Select all

[    9.272876] panfrost ffe40000.gpu: clock rate = 24000000
[    9.272935] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[    9.273734] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[    9.273741] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[    9.273744] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[    9.273747] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[    9.275154] panfrost ffe40000.gpu: error powering up gpu L2
[    9.276803] panfrost ffe40000.gpu: error powering up gpu shader
The 2 last errors is what panfrost developers are discussing on todays irc log 2020-10-08 (I guess you are stollejocke :)) and there seem to already be a fix/patch in place worked by Christian Hewitt (chewitt) as suggested by Steven Price from ARM.

Proceeded to test with wayfire but after launch and running some gtk application most of the screen turns black, and moving the mouse causes it to render parts of it (not sure if this is an issue with the latest commit of mesa that I build). Later tested with weston and running glmark2-es2-wayland seems to give good performance but with the black parts of screen mentioned before as shown on the following photo:

Image

Maybe mesa needs some more build flags turned on to make it work better/properly. As a side note, nothing OpenGL works under X yet.

Anyways it would be now good to test chewitt branch of the linux kernel which seems to include most of the patches we need plus the new patch to fix the panfrost error messages. All these stuff is getting exciting :D

Edit: Added a linux PKGBUILD for chewitt linux branch with the panfrost patch https://github.com/jgmdev/archlinux-odr ... chewitt-59
These users thanked the author jgmdev for the post:
harddroid (Fri Oct 09, 2020 6:14 am)

brad
Posts: 1289
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 93 times
Been thanked: 145 times
Contact:

Re: Panfrost Status on Odroid N2

Post by brad »

jgmdev wrote:
Fri Oct 09, 2020 4:56 am
Proceeded to test with wayfire but after launch and running some gtk application most of the screen turns black, and moving the mouse causes it to render parts of it (not sure if this is an issue with the latest commit of mesa that I build). Later tested with weston and running glmark2-es2-wayland seems to give good performance but with the black parts of screen mentioned before as shown on the following photo:
This is the same problem I was seeing with the aml blobs and tobetters ubuntu image with kde plasma when I tried a few months ago. I wonder if it could be an issue with the DRM kernel drivers and how it manages the overlay.

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

brad wrote:
Fri Oct 09, 2020 8:02 am
I wonder if it could be an issue with the DRM kernel drivers and how it manages the overlay.
Maybe, also it seems panfrost developers where using this older mali kernel driver https://github.com/LibreELEC/mali-bifro ... 6p0-01rel0 as a reference to implement the panfrost stuff... Not sure if newer mali kernel driver version include fixes for issues that are still carried out on the kernel mali code.

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

@ jgmdev
Yes, Im stollejocke. :D Good catch. I can confirm your graphic glitches with weston. But if you run supertux2, the game itself does not glitch, just the desktop around the window. I dont know why Im failing to run plasma desktop with the current driver, because one stated in the irc that its working. I will try the chewitt kernel sources, too.

//EDIT
With chewitts kernel its the same. Maybe I need to configure something with plasma. I just use startplasma-wayland.

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

harddroid wrote:
Fri Oct 09, 2020 8:06 pm
//EDIT
With chewitts kernel its the same. Maybe I need to configure something with plasma. I just use startplasma-wayland.
From https://wiki.archlinux.org/index.php/KDE
To start a Plasma on Wayland session from a console, run
XDG_SESSION_TYPE=wayland dbus-run-session startplasma-wayland
Edit: Reinstalled KDE for testing (with latest mesa from git) and it indeed runs and doesn't seem to have the severe black rendering issue as on wayfire(wlroots)/weston but it crashes as soon as you try to do something, the picture below was taken after the system crashed when trying to open the applications menu:

Image

Edit #2: Gnome also runs and doesn't seems to crash but the black rendering issue is worst than that of wayfire.
These users thanked the author jgmdev for the post:
harddroid (Mon Oct 12, 2020 2:41 pm)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Uploaded some pre-built kernel (5.9 rc8) packages for testing under archlinux that include panfrost patches from toemu branch, chewitt patch fix + tobetter branch that has changes for better hdmi output (fix green line, etc...) and built-in audio support.

https://mega.nz/folder/jN03DbgZ#CHKKmJt-fYGISCE0t0XmBg

Packages are named:
linux-odroid-n2-panfrost-59-5.9.0.rc8-1-aarch64.pkg.tar.zst
linux-odroid-n2-panfrost-59-headers-5.9.0.rc8-1-aarch64.pkg.tar.zst
These users thanked the author jgmdev for the post (total 2):
harddroid (Mon Oct 12, 2020 3:55 pm) • istanbulls (Mon Oct 12, 2020 5:42 pm)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

Plasma does now start and for me it does not crash on opening the menu or other programs. All I needed was a newer version of mesa (mesa-arm-git 20.3.0_devel.129324.8f8ee5b95b6-1). But it has a lot of glitches and supertux2 performance is very bad (6-7fps, with weston it does run better (50-60fps)).
These users thanked the author harddroid for the post (total 2):
jgmdev (Mon Oct 12, 2020 6:53 pm) • deuteragenie (Mon Oct 12, 2020 7:18 pm)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

harddroid wrote:
Mon Oct 12, 2020 5:20 pm
Plasma does now start and for me it does not crash on opening the menu or other programs. All I needed was a newer version of mesa (mesa-arm-git 20.3.0_devel.129324.8f8ee5b95b6-1).
....
Which kernel are you using? I noticed that if I compile mesa with llvm included it crashes the system faster than without llvm, compiling a recent mesa-git version without llvm do keeps kde working for a longer time, but after a couple of seconds the system becomes unresponsive and it also crashes on my end. Overall, KDE rendering has less glitches than Gnome, Weston and Wayfire but the system crashes for me. I believe (and also read on IRC) that standalone wayland kodi may work and since supertux2 seems to work without major rendering glitches (but I do also get supertux2 crashes when playing). I wonder if and which kind of testing we could do to help panfrost/mesa developers without been intrusive at this time where they are still doing heavy development...

And just in case my setup is running on a USB SSD so that we can compare our different setups. I think we need another lighter archlinux image that includes one of the working panfrost kernels + mesa from git in order to test it directly on the emmc and sd to be able to reproduce issues by different people...

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

Im on this kernel: https://github.com/jgmdev/archlinux-odr ... chewitt-59 and Im using my own mesa-arm-git build https://github.com/astralaster/archlinu ... sa-arm-git. Maybe you found something with the usb root, because Im on sdcard here. I like the idea of a minimal alarm image for n2 for panfrost testing.

//EDIT
Here is an arch linux image for the n2 which you can just flash with any image writer like balena. It has chewitt kernel installed, current mesa and kde, supertux2. Credentials are alarm (password: alarm) and root (password: root) and ssh is active.
https://drive.google.com/file/d/1FnapAb ... sp=sharing
These users thanked the author harddroid for the post (total 2):
deuteragenie (Wed Oct 14, 2020 4:46 am) • jgmdev (Thu Oct 15, 2020 5:45 pm)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Just discovered that all system freezes (panics) was because of the v5.9-rc5-for-mesa-ci kernel branch, chewitt branch (which was rebased to stable linux v5.9 recently) works much better and KDE doesn't panics as before, so it seems it wasn't related to mesa at all but drm/panfrost. I made a branch with chewitt and tobetter odroid changes that fixes some other stuff like the green line on display which also adds additional dtb files with gpio configuration, etc...
These users thanked the author jgmdev for the post (total 2):
brad (Wed Oct 14, 2020 7:14 am) • harddroid (Wed Oct 14, 2020 10:22 pm)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

jgmdev wrote:
Wed Oct 14, 2020 5:42 am
Just discovered that all system freezes (panics) was because of the v5.9-rc5-for-mesa-ci kernel branch, chewitt branch (which was rebased to stable linux v5.9 recently) works much better and KDE doesn't panics as before, so it seems it wasn't related to mesa at all but drm/panfrost. I made a branch with chewitt and tobetter odroid changes that fixes some other stuff like the green line on display which also adds additional dtb files with gpio configuration, etc...
Im not sure why, but your kernel does work better with my display than my builds with hdmi patches: viewtopic.php?f=181&t=39848

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

harddroid wrote:
Wed Oct 14, 2020 10:24 pm
Im not sure why, but your kernel does work better with my display than my builds with hdmi patches: viewtopic.php?f=181&t=39848
Maybe the final v5.9 release has better hdmi support, and the tobetter branch includes hdmi fixes. Also I rebased tobetter branch into the chewitt branch so it is running atop patches that are going to be available on 5.10 which seems to include lots of fixes and improvements also.

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Uploaded archlinux kodi-git builds for X11, Wayland and GBM for testing. The wayland and gbm builds use the gles rendering system so they work under panfrost/mesa:

https://mega.nz/folder/mYNCyRKI#NQsJ4fp9XICZv49ZP8IKdw

Also uploaded the required ArchLinux kernel v5.9 packages using chewitt and tobetter branches (the packages that have panfrost on its name):

https://mega.nz/folder/jN03DbgZ#CHKKmJt-fYGISCE0t0XmBg

Here some screenshots running the gbm version which is the most stable version on panfrost as far as I tested and doesn't requires X11/Wayland to work:

Image

Image

GBM Setup
In order to get keyboard and mouse working on the kodi-gbm build you would need to add your user to the input group:

Code: Select all

sudo usermod -G input -a <username>
And just to be sure everything work as it should you should add your user to all these groups:

Code: Select all

sudo usermod -G network,power,tty,audio,disk,storage,video -a <username>
Launching GBM Build

On a tty (CTRL + ALT + F1-F6) run /usr/lib/kodi/kodi-gbm

Also, for video playback to work you will need to change some of the kodi Player settings:

Disable Allow using DRM PRIME Decoder
Set PRIME Render Method to EGL

Here a picture for reference:

Image
These users thanked the author jgmdev for the post (total 5):
tobetter (Thu Oct 15, 2020 2:37 am) • brad (Thu Oct 15, 2020 7:07 am) • odroid (Thu Oct 15, 2020 10:26 am) • superpowter77 (Thu Oct 15, 2020 11:37 am) • istanbulls (Thu Oct 15, 2020 7:47 pm)

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Just "finished" putting together a more plain image with the panfrost enabled kernel and the mali-arm-git package, also includes a packages repository that I finally finished setting up to ease future updates. The repository will include automated builds of packages every 30 minutes (as far as it could be possible), with major attraction been mesa-arm-git which moves really fast. The automated build system will fetch packages from https://github.com/jgmdev/archlinux-odroid so useful pull requests are welcome. The image also includes support for most rtl88xxau wifi adapters that are used with the odroid's by using this driver https://github.com/aircrack-ng/rtl8812au

To setup the wifi from cli you can run sudo wifi-menu. To enable permanently you can list your wifi connection names with netctl list and enable it at startup with sudo netctl enable <connection-name>

The overall idea is to make it easier to track and test latest panfrost on mesa and kernel, also this environment (in my opinion :)) may be suitable and easier to use by developers that are involved with the panfrost project or want to contribute to it.

Image Download Link

https://mega.nz/file/7cdlRKSS#45kgRas-7 ... -9SkcxD3Jw

username: alarm
password: alarm

Note: The image already has the PAN_MESA_DEBUG=bifrost environment variable set and added to /etc/environment

Repository of Automated Builds

http://archlinuxdroid.tk/

Note: The repository also contains the recent build of kodi that I posted above (packages needed since it seems there was some missing dependencies on the package definition: dav1d, libplist, shairplay), anyways you can see everything that it contains by following the URL.
These users thanked the author jgmdev for the post (total 8):
odroid (Thu Oct 15, 2020 7:37 pm) • brad (Thu Oct 15, 2020 8:05 pm) • harddroid (Thu Oct 15, 2020 11:46 pm) • deuteragenie (Fri Oct 16, 2020 2:32 am) • istanbulls (Fri Oct 16, 2020 2:40 am) • hominoid (Fri Oct 16, 2020 8:29 am) • squidd (Sat Oct 17, 2020 10:10 pm) • Sav (Sun Oct 18, 2020 4:14 pm)

deuteragenie
Posts: 38
Joined: Fri Jun 07, 2019 4:56 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 9 times
Contact:

Re: Panfrost Status on Odroid N2

Post by deuteragenie »

jgmdev wrote:
Thu Oct 15, 2020 7:15 pm
The overall idea is to make it easier to track and test latest panfrost on mesa and kernel, also this environment (in my opinion :)) may be suitable and easier to use by developers that are involved with the panfrost project or want to contribute to it.
Great thanks! I was thinking of contributing to Panfrost development (I know nothing about Mesa/GPUs...but would like to learn) and this is really good for everybody in the same position. I think you should share this on panfrost IRC.

Also, where does one report bugs ? Is it too early to report them on the Mesa Github ? The guidance from the panfrost devs would be welcome.

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

deuteragenie wrote:
Fri Oct 16, 2020 2:37 am
Also, where does one report bugs ? Is it too early to report them on the Mesa Github ?
Yeah, it would be to early to report bugs, unless you know if something is caused by a specific reason and have the solution for it. Bugs like, "the screen is rendering black" will not help since the developers already know about it (the ones that didn't know about it where us :D). But if instead one knows the cause of the screen rendering black, and can pinpoint a kernel drm/panfrost issue, or some wrong thing on mesa code that can be improved, that would really help them.

I read comments on the IRC about using strace, and also enabling trace on the PAN_MESA_DEBUG flags as PAN_MESA_DEBUG=bifrost,trace also it seems that fp16 doesn't works correctly on bifrost yet so they are using: PAN_MESA_DEBUG=bifrost,nofp16,trace The trace part generates logs on your HOME directory if I recall correctly.

jgmdev
Posts: 187
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4
Has thanked: 59 times
Been thanked: 132 times
Contact:

Re: Panfrost Status on Odroid N2

Post by jgmdev »

Just writing to report that the same black issue with the Odroid N2 is also seen on the Odroid C4.
These users thanked the author jgmdev for the post:
squidd (Mon Oct 19, 2020 8:21 am)

harddroid
Posts: 61
Joined: Thu Aug 06, 2020 1:56 am
languages_spoken: english, german
ODROIDs: n2
Has thanked: 23 times
Been thanked: 25 times
Contact:

Re: Panfrost Status on Odroid N2

Post by harddroid »

jgmdev wrote:
Thu Oct 15, 2020 7:15 pm
Repository of Automated Builds

http://archlinuxdroid.tk/

Note: The repository also contains the recent build of kodi that I posted above (packages needed since it seems there was some missing dependencies on the package definition: dav1d, libplist, shairplay), anyways you can see everything that it contains by following the URL.
If you want to add this repo to your archlinux just edit /etc/pacman.conf and add this to the end:

Code: Select all

[archlinuxdroid]
SigLevel = Optional
Server = http://archlinuxdroid.tk/archlinuxdroid/aarch64
I did a new test with kde plasma desktop:

Code: Select all

local/plasma-desktop 5.20.0-1 (plasma)
    KDE Plasma Desktop
local/mesa-arm-git 20.3.0_devel.130101.57d317865e7-1
    An open-source implementation of the OpenGL specification
local/glmark2-git r924.06e4728-1
    OpenGL (ES) 2.0 benchmark (X11, Wayland, DRM)
Now plasma has the same everything goes black behaviour as weston and also the same performance. Supertux2 for example runs at the same fps now. Glmark2 does crash after the 4th test.

Code: Select all

[   46.849296] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7301, status=0x8, head=0x313bbc0, tail=0x313bbc0, sched_job=0000000004296cad
[   46.864698] panfrost ffe40000.gpu: js fault, js=0, status=DATA_INVALID_FAULT, head=0x5536bc0, tail=0x5536bc0
[   46.868891] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x58, head=0x5536bc0, tail=0x5536bc0, sched_job=00000000e59d3524
[   50.876311] panfrost ffe40000.gpu: Unhandled Page fault in AS0 at VA 0x000000009E15DE00
               Reason: TODO
               raw fault status: 0x6002C1
               decoded fault status: SLAVE FAULT
               exception type 0xC1: TRANSLATION_FAULT_LEVEL1
               access type 0x2: READ
               source id 0x60
[   50.966271] panfrost ffe40000.gpu: Unhandled Page fault in AS0 at VA 0x000000009E15DE00
               Reason: TODO
               raw fault status: 0x6002C1
               decoded fault status: SLAVE FAULT
               exception type 0xC1: TRANSLATION_FAULT_LEVEL1
               access type 0x2: READ
               source id 0x60
[   50.997505] panfrost ffe40000.gpu: Unhandled Page fault in AS0 at VA 0x000000009E15DE00
               Reason: TODO
               raw fault status: 0x6002C1
               decoded fault status: SLAVE FAULT
               exception type 0xC1: TRANSLATION_FAULT_LEVEL1
               access type 0x2: READ
               source id 0x60
[   51.393303] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x8, head=0x5556bc0, tail=0x5556bc0, sched_job=00000000e10e802b
[   57.105963]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
And to the black issue: Maybe it has to do with special features of the g52?
Transaction Elimination 16x16 pixel block size Transaction Elimination spots the identical pixel blocks between two consecutive render targets and performs a partial update to the frame buffer with the changed pixel blocks only, which reduces memory bandwidth and thus energy.
and
Smart Composition 16x16 pixel block size Smart Composition extends the concept of Transaction Elimination to every stage of UI composition. Identical pixel blocks of input surfaces are not read, not processed for composition and not written to final frame buffer.
https://developer.arm.com/ip-products/g ... li-g52-gpu
Maybe the gpu is using some kind of optimization automatically and you need to render things differntly. Maybe thats why the mouse cursor gets updated with an border all around (16px maybe?).
These users thanked the author harddroid for the post (total 2):
jgmdev (Mon Oct 19, 2020 3:59 am) • squidd (Mon Oct 19, 2020 8:21 am)

squidd
Posts: 58
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 28 times
Been thanked: 6 times
Contact:

Re: Panfrost Status on Odroid N2

Post by squidd »

harddroid wrote:
Sun Oct 18, 2020 7:24 pm
jgmdev wrote:
Thu Oct 15, 2020 7:15 pm
Repository of Automated Builds

http://archlinuxdroid.tk/

Note: The repository also contains the recent build of kodi that I posted above (packages needed since it seems there was some missing dependencies on the package definition: dav1d, libplist, shairplay), anyways you can see everything that it contains by following the URL.
If you want to add this repo to your archlinux just edit /etc/pacman.conf and add this to the end:

Code: Select all

[archlinuxdroid]
SigLevel = Optional
Server = http://archlinuxdroid.tk/archlinuxdroid/aarch64
Is this repo OK to use with jgmdev's Arch gnome image from a few months back? I wonder if I can successfully install one of the newer kernels and gnome will still be stable? Interesting stuff here, thanks for putting in the work.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests