Panfrost for Bifrost GPUs - Big improvements

Hi,

I am running kernel 5.9.0-1-MANJARO-ARM on my X96Max+ TV box (CPU: Amlogic S905X3, GPU: Mali G31). With todays build of the Mesa package Panfrost driver runs out of the box even on XFCE.

If you want to give it a try just add the following to /etc/pacman.conf (see Re: Panfrost Status on Odroid N2 for reference):

[archlinuxdroid]
SigLevel = Optional
Server = http://archlinuxdroid.tk/archlinuxdroid/aarch64

You can then install ‘mesa-arm-git’ (which brings you the newest Mesa package) and some additional games if you like.

ATTENTION: Better do not install ‘linux-amlogic-panfrost-59’ (which installs a patched 5.9.3 kernel). My system did not boot anymore after I did.

Supertuxkart runs well for some level (e.g. “Nessie’s Pond”) but still crashes on more demanding level (e.g. “Ravenbridge Mansion”). Openarena loads the menu but crashes a short while after starting a game. Cendric worked perfectly.

I did not test kodi, yet.

I am not sure if the crashes are due to errors in Mesa or the 5.9.0 kernel. It would be great if we could have the patches 5.9.3 kernel also for Manjaro. Maybe Strit or spikerguy can help? :grinning:

Thanks to all the great people for their endless efforts to bring all the improvements to ARM based devices!!!

3 Likes

Mesa version?

What reports glxinfo?

[themojoman@manjaro-arm64 ~]$ glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Panfrost (0xffffffff)
Device: Mali G31 (Panfrost) (0xffffffff)
Version: 20.3.0
Accelerated: yes
Video memory: 3597MB
Unified memory: yes
Preferred profile: compat (0x2)
Max core profile version: 0.0
Max compat profile version: 2.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 2.0
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali G31 (Panfrost)
OpenGL version string: 2.1 Mesa 20.3.0-devel (git-61d2badbf4)
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.0-devel (git-61d2badbf4)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

Here are the results for glmark2-es2 on XFCE. I think to remember that the results with LLVM were better. Have to check once more … [Edit: llvm glmark2 Score: 50]

[themojoman@manjaro-arm64 ~]$ glmark2-es2
=======================================================
    glmark2 2020.04
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G31 (Panfrost)
    GL_VERSION:    OpenGL ES 2.0 Mesa 20.3.0-devel (git-61d2badbf4)
=======================================================
[build] use-vbo=false: FPS: 96 FrameTime: 10.417 ms
[build] use-vbo=true: FPS: 103 FrameTime: 9.709 ms
[texture] texture-filter=nearest: FPS: 141 FrameTime: 7.092 ms
[texture] texture-filter=linear: FPS: 140 FrameTime: 7.143 ms
[texture] texture-filter=mipmap: FPS: 141 FrameTime: 7.092 ms
[shading] shading=gouraud: FPS: 84 FrameTime: 11.905 ms
[shading] shading=blinn-phong-inf: FPS: 85 FrameTime: 11.765 ms
[shading] shading=phong: FPS: 81 FrameTime: 12.346 ms
[shading] shading=cel: FPS: 80 FrameTime: 12.500 ms
[bump] bump-render=high-poly: FPS: 44 FrameTime: 22.727 ms
[bump] bump-render=normals: FPS: 122 FrameTime: 8.197 ms
[bump] bump-render=height: FPS: 120 FrameTime: 8.333 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 90 FrameTime: 11.111 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 60 FrameTime: 16.667 ms
[pulsar] light=false:quads=5:texture=false: FPS: 138 FrameTime: 7.246 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 35 FrameTime: 28.571 ms
[desktop] effect=shadow:windows=4: FPS: 114 FrameTime: 8.772 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 40 FrameTime: 25.000 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 40 FrameTime: 25.000 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 51 FrameTime: 19.608 ms
[ideas] speed=duration: FPS: 79 FrameTime: 12.658 ms
[jellyfish] <default>: FPS: 80 FrameTime: 12.500 ms
[terrain] <default>: FPS: 7 FrameTime: 142.857 ms
[shadow] <default>: FPS: 64 FrameTime: 15.625 ms
[refract] <default>: FPS: 14 FrameTime: 71.429 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 115 FrameTime: 8.696 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 93 FrameTime: 10.753 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 112 FrameTime: 8.929 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 105 FrameTime: 9.524 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 92 FrameTime: 10.870 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 102 FrameTime: 9.804 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 103 FrameTime: 9.709 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 84 FrameTime: 11.905 ms
=======================================================
                                  glmark2 Score: 86 
=======================================================

And here comes glmark2-es2-wayland using sway/wayland:

[themojoman@manjaro-arm64 ~]$ glmark2-es2-wayland 
=======================================================
    glmark2 2020.04
=======================================================
    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali G31 (Panfrost)
    GL_VERSION:    OpenGL ES 2.0 Mesa 20.3.0-devel (git-61d2badbf4)
=======================================================
[build] use-vbo=false: FPS: 81 FrameTime: 12.346 ms
[build] use-vbo=true: FPS: 117 FrameTime: 8.547 ms
[texture] texture-filter=nearest: FPS: 90 FrameTime: 11.111 ms
[texture] texture-filter=linear: FPS: 89 FrameTime: 11.236 ms
[texture] texture-filter=mipmap: FPS: 92 FrameTime: 10.870 ms
[shading] shading=gouraud: FPS: 91 FrameTime: 10.989 ms
[shading] shading=blinn-phong-inf: FPS: 93 FrameTime: 10.753 ms
[shading] shading=phong: FPS: 71 FrameTime: 14.085 ms
[shading] shading=cel: FPS: 73 FrameTime: 13.699 ms
[bump] bump-render=high-poly: FPS: 40 FrameTime: 25.000 ms
[bump] bump-render=normals: FPS: 94 FrameTime: 10.638 ms
[bump] bump-render=height: FPS: 99 FrameTime: 10.101 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 114 FrameTime: 8.772 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 59 FrameTime: 16.949 ms
[pulsar] light=false:quads=5:texture=false: FPS: 89 FrameTime: 11.236 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 35 FrameTime: 28.571 ms
[desktop] effect=shadow:windows=4: FPS: 64 FrameTime: 15.625 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 27 FrameTime: 37.037 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 26 FrameTime: 38.462 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 35 FrameTime: 28.571 ms
[ideas] speed=duration: FPS: 59 FrameTime: 16.949 ms
[jellyfish] <default>: FPS: 71 FrameTime: 14.085 ms
[terrain] <default>: FPS: 7 FrameTime: 142.857 ms
[shadow] <default>: FPS: 70 FrameTime: 14.286 ms
[refract] <default>: FPS: 13 FrameTime: 76.923 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 96 FrameTime: 10.417 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 124 FrameTime: 8.065 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 93 FrameTime: 10.753 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 105 FrameTime: 9.524 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 123 FrameTime: 8.130 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 101 FrameTime: 9.901 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 106 FrameTime: 9.434 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 108 FrameTime: 9.259 ms
=======================================================
                                  glmark2 Score: 77 
=======================================================

So it works on X11 now?

rebuilding mesa-git to test

1 Like

Firefox is still very unstable on XFCE when using Panfrost. Crashed three times while I tried to post the above results. Seems to be more stable when using sway.

1 Like

Please share the output of this command

inxi -Fxzi

Yep hopefully soon.

Most likely mesa as you’re using development version which is not be a stable version and Bifrost is still at its early stages.

Kodi might do ui over hw but not video playback.

Thanks for the update.

Yes, it does work. But it is still very unstable. Not for daily usage.

Maybe we can have a test build of the patched 5.9.3 kernel also for Manjaro ARM? I tried to run the test build that jgmdev provides at the Odroid forum (see link in post #1) but it did not boot on my machine. Their boot partition looks quite different to BOOT_MNJRO.

Well, I’m running kernel 5.9.3 here (linux package) and I don’t have any issues.

What’s so special bout this “patched” kernel?

I read that it should also contain the latest patches of the Panfrost dev team.

I’m very interested in your results with your 5.9.3 kernel :grinning:

There was some Panfrost patches added to 5.9.2, which enabled some Bifrost support.
And the memory leak was fixed in 5.9.5/5.9.6, which we correctly have in unstable branch.

Seems I have to switch to the unstable branch then …

Will it work with the linux-vim package (because that is what I am using right now)?

I don’t think linux-vim has those patches.

I see. I guess I cannot change from linux-vim to linux because I am running Manjaro ARM on Amlogic S905X3?

If the DTB you are using is present in linux I don’t see why not. That’s what we have in our Odroid C4 profile (which is also an S905X3 board).

Results from my Panfrost test:

I’m using KDE Plasma 5.20.2 with SDDM as my display-manager.
Enabling Panfrost results in fonts being misrendered in SDDM.
When logging into X11, Kwin crashes immediately.
When logging into Wayland session, it’s just a black screen, with hot corners and a mouse cursor. So I assume plasmashell crashes in this case.
But, by disabling 3d acceleration in Plasma (with QT_QUICK_RENDERER=software in /etc/environment) I get my working desktop back. Sure it’s not hardware accelereted, but apps seem to be, as in my Element client was suddenly smooth.

[strit@loke ~]$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Panfrost (0xffffffff)
    Device: Mali G52 (Panfrost) (0xffffffff)
    Version: 20.3.0
    Accelerated: yes
    Video memory: 3627MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 2.0
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali G52 (Panfrost)
OpenGL version string: 2.1 Mesa 20.3.0-devel (git-10d44fec2d)
OpenGL shading language version string: 1.20

OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.0-devel (git-10d44fec2d)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16

Uploaded this mesa-git package to unstable branch.

Which dtb are you using?
Can you show dmesg |grep panfrost?

I use ‘meson-sm1-sei610-2.dtb’ which is based on ‘meson-sm1-sei610.dtb’ and is patched for ethernet and audio to work on X96Max+. You can find it here.

[themojoman@manjaro-arm64 ~]$ dmesg | grep panfrost
[    4.606550] panfrost ffe40000.gpu: clock rate = 799999987
[    4.606616] panfrost ffe40000.gpu: supply mali not found, using dummy regulator
[    4.614069] panfrost ffe40000.gpu: mali-g31 id 0x7093 major 0x0 minor 0x0 status 0x0
[    4.621407] panfrost ffe40000.gpu: features: 00000000,17de77ff, issues: 00000000,00000400
[    4.629469] panfrost ffe40000.gpu: Features: L2:0x07100206 Shader:0x00000000 Tiler:0x00000209 Mem:0x1 MMU:0x00002821 AS:0xff JS:0x7
[    4.641216] panfrost ffe40000.gpu: shader_present=0x1 l2_present=0x1
[    4.648690] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 0

Sorry spikerguy! I missed your post …

[themojoman@manjaro-arm64 ~]$ inxi -Fxzi
System:
  Kernel: 5.9.0-1-MANJARO-ARM aarch64 bits: 64 compiler: N/A 
  Desktop: Xfce 4.14.2 Distro: Manjaro ARM 
Machine:
  Type: ARM Device System: SEI Robotics SEI610 details: N/A 
CPU:
  Topology: Quad Core model: N/A variant: cortex-a55 bits: 64 type: MCP 
  arch: ARMv8 
  features: Use -f option to see features bogomips: 0 
  Speed: 250 MHz min/max: 100/1908 MHz Core speeds (MHz): 1: 250 2: 250 
  3: 250 4: 250 
Graphics:
  Device-1: meson-g12a-mali driver: panfrost v: kernel bus ID: N/A 
  Device-2: meson-g12a-dw-hdmi driver: meson_dw_hdmi v: N/A bus ID: N/A 
  Display: x11 server: X.org 1.20.9 driver: modesetting 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mali G31 (Panfrost) 
  v: 2.1 Mesa 20.3.0-devel (git-61d2badbf4) direct render: Yes 
Audio:
  Device-1: meson-g12a-dw-hdmi driver: meson_dw_hdmi bus ID: N/A 
  Device-2: axg-sound-card driver: axg_sound_card bus ID: N/A 
  Sound Server: ALSA v: k5.9.0-1-MANJARO-ARM 
Network:
  Device-1: meson-axg-dwmac driver: meson8b_dwmac v: N/A port: N/A 
  bus ID: N/A 
  IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  Device-2: pwm-clock driver: pwm_clock v: N/A port: N/A bus ID: N/A 
  Device-3: pwm-clock driver: pwm_clock v: N/A port: N/A bus ID: N/A 
  IF-ID-1: ip6tnl0 state: down mac: <filter> 
  WAN IP: <filter> 
Drives:
  Local Storage: total: 88.07 GiB used: 8.63 GiB (9.8%) 
  ID-1: /dev/mmcblk1 model: 5WCGP size: 29.83 GiB 
  ID-2: /dev/mmcblk2 model: CJNB4R size: 58.24 GiB 
Partition:
  ID-1: / size: 29.06 GiB used: 8.57 GiB (29.5%) fs: ext4 
  dev: /dev/mmcblk1p2 
  ID-2: /boot size: 213.4 MiB used: 64.5 MiB (30.2%) fs: vfat 
  dev: /dev/mmcblk1p1 
Swap:
  ID-1: swap-1 type: zram size: 5.27 GiB used: 0 KiB (0.0%) dev: /dev/zram0 
Sensors:
  Message: No sensors data was found. Is sensors configured? 
Info:
  Processes: 186 Uptime: 1m Memory: 3.51 GiB used: 528.6 MiB (14.7%) 
  Init: systemd Compilers: gcc: N/A Packages: 688 Shell: Bash v: 5.0.18 
  inxi: 3.1.05 

Resolution of desktop is 1280 x 720.

1 Like