Jump to content

Panfrost on S912


malloc32

Recommended Posts

Hello, I have read a lot to get panfrost ins a s912 tv box, but always with same result... llvmpipe. I don t know how to make it works...

I have a H96 pro plus 3GB 32GB, S912.

I tried with a lot balbes150 images, Single Armbian image for RK + AML + AW and S9xx images. Now with 20.5.2, 5.7 focal.

 

malloc@arm-64:~$ inxi -F
System:
  Host: arm-64 Kernel: 5.7.0-rc1-arm-64 aarch64 bits: 64 
  Desktop: Xfce 4.14.2 Distro: Ubuntu 20.04 LTS (Focal Fossa) 
Machine:
  Type: ARM Device System: Amlogic Meson GXM (S912) Q200 Development Board 
  details: N/A 
CPU:
  Topology: 8-Core (2-Die) model: ARMv8 v8l variant: cortex-a53 bits: 64 
  type: MCP MCM 
  Speed: 1512 MHz min/max: 100/1512:1000 MHz Core speeds (MHz): 1: 1512 
  2: 1512 3: 1512 4: 1512 5: 1000 6: 1000 7: 1000 8: 1000 
Graphics:
  Device-1: meson-gxm-dw-hdmi driver: meson_dw_hdmi v: N/A 
  Device-2: meson-gxm-mali driver: panfrost v: kernel 
  Display: x11 server: X.org 1.20.8 driver: modesetting 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: llvmpipe (LLVM 9.0.1 128 bits) 
  v: 3.3 Mesa 20.1.0-devel (git-cdc4377 2020-04-18 focal-oibaf-ppa) 
Audio:
  Device-1: meson-gxm-dw-hdmi driver: meson_dw_hdmi 
  Device-2: gx-sound-card driver: gx_sound_card 
  Sound Server: ALSA v: k5.7.0-rc1-arm-64 
Network:
  Device-1: meson-gxbb-dwmac driver: meson8b_dwmac 
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: 78:c2:c0:9a:80:f1 
  Device-2: pwm-clock driver: pwm_clock 
Drives:
  Local Storage: total: 58.84 GiB used: 2.96 GiB (5.0%) 
  ID-1: /dev/mmcblk0 vendor: SanDisk model: SL32G size: 29.72 GiB 
  ID-2: /dev/mmcblk1 model: 032G74 size: 29.12 GiB 
Partition:
  ID-1: / size: 28.39 GiB used: 2.87 GiB (10.1%) fs: ext4 
  dev: /dev/mmcblk0p2 
  ID-2: /boot size: 511.0 MiB used: 65.5 MiB (12.8%) fs: vfat 
  dev: /dev/mmcblk0p1 
  ID-3: /var/log size: 48.4 MiB used: 2.3 MiB (4.8%) fs: ext4 
  dev: /dev/zram0 
Sensors:
  Missing: Required tool sensors not installed. Check --recommends 
Info:
  Processes: 246 Uptime: 10m Memory: 2.68 GiB used: 1.09 GiB (40.9%) 
  Shell: bash inxi: 3.0.38 

I tried NicoD script, sudo ./installPanfrost.sh

I tried

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt-get upgrade

I tried https://panfrost.freedesktop.org/building-panfrost-mesa.html

 

Always the same result... OpenGl rendered llvmpipe

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: VMware, Inc. (0xffffffff)
    Device: llvmpipe (LLVM 9.0.1, 128 bits) (0xffffffff)
    Version: 20.1.0
    Accelerated: no
    Video memory: 2741MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 9.0.1, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.1.0-devel (git-cdc4377 2020-04-18 focal-oibaf-ppa)

I m newbie in linux, always work with windows, but I like to have a small computer with linux. Now I use my tvbox for vpn, transmission, dlna, web server, nodejs, docker... it is connected by hdmi to a television, so I want to play some emulators, but without HW opengl renderer it is very slow... I now emuelec, LE... but I like Armbian...

 

Thank you very much.

Link to comment
Share on other sites

Thank you very much, but it doesnt work :(, seems that glamor cant be used in llvmpipe

    20.361] Build Operating System: Linux 4.4.0-177-generic aarch64 Ubuntu
[    20.361] Current Operating System: Linux arm-64 5.7.0-rc1-arm-64 #20.05.2 SMP PREEMPT Wed Apr 15 17:08:42 MSK 2020 aarch64
[    20.361] Kernel command line: root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 mac=78:c2:c0:9a:80:f1
[    20.362] Build Date: 06 April 2020  09:39:29AM
[    20.362] xorg-server 2:1.20.8-2ubuntu2 (For technical support please see http://www.ubuntu.com/support) 
[    20.362] Current version of pixman: 0.38.4
[    20.362] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    20.362] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    20.362] (==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 19 17:17:13 2020
[    20.396] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    20.396] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    20.419] (==) No Layout section.  Using the first Screen section.
[    20.420] (==) No screen section available. Using defaults.
[    20.420] (**) |-->Screen "Default Screen Section" (0)
[    20.420] (**) |   |-->Monitor "<default monitor>"
[    20.445] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[    20.445] (**) |   |-->Device "Default Device"
[    20.445] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    20.445] (**) Option "AutoAddGPU" "off"
[    20.445] (**) Option "Debug" "dmabuf_capable"
[    20.445] (==) Automatically adding devices
[    20.445] (==) Automatically enabling devices
[    20.445] (**) Not automatically adding GPU devices
[    20.445] (==) Automatically binding GPU devices
[    20.445] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    20.476] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    20.476] 	Entry deleted from font path.
[    20.476] (==) FontPath set to:
	/usr/share/fonts/X11/misc,
	built-ins
[    20.476] (==) ModulePath set to "/usr/lib/xorg/modules"
[    20.476] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    20.477] (II) Loader magic: 0xaaaae6f9f010
[    20.477] (II) Module ABI versions:
[    20.477] 	X.Org ANSI C Emulation: 0.4
[    20.477] 	X.Org Video Driver: 24.1
[    20.477] 	X.Org XInput driver : 24.1
[    20.477] 	X.Org Server Extension : 10.0
[    20.483] (++) using VT number 7

[    20.483] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    20.487] (II) xfree86: Adding drm device (/dev/dri/card0)
[    20.488] (**) OutputClass "Lima" setting /dev/dri/card0 as PrimaryGPU
[    20.489] (II) LoadModule: "glx"
[    20.495] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    20.621] (II) Module glx: vendor="X.Org Foundation"
[    20.621] 	compiled for 1.20.8, module version = 1.0.0
[    20.621] 	ABI class: X.Org Server Extension, version 10.0
[    20.622] (II) LoadModule: "modesetting"
[    20.622] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    20.636] (II) Module modesetting: vendor="X.Org Foundation"
[    20.637] 	compiled for 1.20.8, module version = 1.20.8
[    20.637] 	Module class: X.Org Video Driver
[    20.637] 	ABI class: X.Org Video Driver, version 24.1
[    20.637] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    20.674] (II) modeset(0): using drv /dev/dri/card0
[    20.675] (II) modeset(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[    20.675] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[    20.675] (II) Applying OutputClass "Lima" options to /dev/dri/card0
[    20.675] (**) modeset(0): Option "AccelMethod" "glamor"
[    20.675] (==) modeset(0): RGB weight 888
[    20.675] (==) modeset(0): Default visual is TrueColor
[    20.675] (II) Loading sub module "glamoregl"
[    20.675] (II) LoadModule: "glamoregl"
[    20.676] (II) Loading /usr/lib/xorg/modules/libglamoregl.so
[    20.740] (II) Module glamoregl: vendor="X.Org Foundation"
[    20.740] 	compiled for 1.20.8, module version = 1.0.1
[    20.740] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    23.269] (II) modeset(0): Refusing to try glamor on llvmpipe
[    23.273] (EE) modeset(0): glamor initialization failed

Xorg conf file


Section "Monitor"
        Identifier              "Monitor0"
        Option                  "DPMS" "false"
EndSection
Section "ServerFlags"
        Option                  "BlankTime" "0"
        Option                  "StandbyTime" "0"
        Option                  "SuspendTime" "0"
        Option                  "OffTime" "0"
EndSection
Section "Device"
    Identifier  "Default Device"
    Driver      "modesetting"
    Option      "AccelMethod"    "glamor"     ### "glamor" to enable 3D acceleration, "none" to disable.
EndSection
Section "ServerFlags"
        Option  "AutoAddGPU" "off"
        Option "Debug" "dmabuf_capable"
EndSection
Section "OutputClass"
        Identifier "Lima"
        MatchDriver "meson"  # sun4i-drm  rockchip
        Driver "modesetting"
        Option "PrimaryGPU" "true"
EndSection

Thank you very much.

Link to comment
Share on other sites

remove below

Quote

 

Section "Device"

   Identifier "Default Device"

   Driver "modesetting"

    Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable.

EndSection

 

identifier is a name for better understanding, it is not used by mesa to choose the driver.

Link to comment
Share on other sites

17 hours ago, Werner said:

Try to build mesa drivers from scratch since the oibaf ppa did not work for me either.

apt build-dep mesa

And then follow the guide here: https://panfrost.freedesktop.org/building-panfrost-mesa.html

I have triewd with 5.6.2 bionic, and not works, inix -G -> can`t found graphics card!

 

Install meson 0.49 to complie.

Install all dependencies.

Clone and compile mesa. Some warnings, but no errors.

ninja build

ninja install

apt update

reboot

 

I will try again with other version.

 

Thank you.

 

 

 

Link to comment
Share on other sites

by chance i did experiment with panfrost on s912 right now using a 5.6.2 kernel (with panfrost as a module) and 20.0.4 mesa (all compiled myself) and ran into problems as well - what made it work in the end for me was to compile a fresh libdrm (https://gitlab.freedesktop.org/mesa/drm) and use the xorg.conf from the lima project (https://gitlab.freedesktop.org/lima/web/blob/master/README.md) with "meson" as display drm driver. everything else is regular ubuntu 18.04 and now it works very well.

 

good luck and best wishes - hexdump

Link to comment
Share on other sites

Quote

Try to build mesa drivers from scratch since the oibaf ppa did not work for me either.

apt build-dep mesa

And then follow the guide here: https://panfrost.freedesktop.org/building-panfrost-mesa.html

 

Quote

by chance i did experiment with panfrost on s912 right now using a 5.6.2 kernel (with panfrost as a module) and 20.0.4 mesa (all compiled myself) and ran into problems as well - what made it work in the end for me was to compile a fresh libdrm (https://gitlab.freedesktop.org/mesa/drm) and use the xorg.conf from the lima project (https://gitlab.freedesktop.org/lima/web/blob/master/README.md) with "meson" as display drm driver. everything else is regular ubuntu 18.04 and now it works very well.

Not works....

Always same result llvmpipe....

But i dont understand why the version of mesa rendered is 20.0.4 if I installed 20.1.0

Graphics:
  Device-1: meson-gxm-dw-hdmi driver: meson_dw_hdmi v: N/A 
  Device-2: meson-gxm-mali driver: panfrost v: kernel 
  Display: x11 server: X.org 1.20.8 driver: modesetting 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: llvmpipe (LLVM 9.0.1 128 bits) v: 3.3 Mesa 20.0.4 

if I compiled

 

malloc@arm-64:~/mesa$ cat VERSION 
20.1.0-devel
alloc@arm-64:~/mesa$ sudo ninja -C build/ install
[sudo] password for malloc: 
ninja: Entering directory `build/'
[1/2] Installing files.
Installing src/mapi/shared-glapi/libglapi.so.0.0.0 to /usr/lib/aarch64-linux-gnu
Installing src/mapi/es1api/libGLESv1_CM.so.1.1.0 to /usr/lib/aarch64-linux-gnu
Installing src/mapi/es2api/libGLESv2.so.2.0.0 to /usr/lib/aarch64-linux-gnu
Installing src/glx/libGL.so.1.2.0 to /usr/lib/aarch64-linux-gnu
Installing src/gbm/libgbm.so.1.0.0 to /usr/lib/aarch64-linux-gnu
Installing src/egl/libEGL.so.1.0.0 to /usr/lib/aarch64-linux-gnu
Installing src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri
Installing /home/malloc/mesa/include/KHR/khrplatform.h to /usr/include/KHR
Installing /home/malloc/mesa/include/GLES/egl.h to /usr/include/GLES
Installing /home/malloc/mesa/include/GLES/gl.h to /usr/include/GLES
Installing /home/malloc/mesa/include/GLES/glext.h to /usr/include/GLES
Installing /home/malloc/mesa/include/GLES/glplatform.h to /usr/include/GLES
Installing /home/malloc/mesa/include/GLES2/gl2.h to /usr/include/GLES2
Installing /home/malloc/mesa/include/GLES2/gl2ext.h to /usr/include/GLES2
Installing /home/malloc/mesa/include/GLES2/gl2platform.h to /usr/include/GLES2
Installing /home/malloc/mesa/include/GLES3/gl3.h to /usr/include/GLES3
Installing /home/malloc/mesa/include/GLES3/gl31.h to /usr/include/GLES3
Installing /home/malloc/mesa/include/GLES3/gl32.h to /usr/include/GLES3
Installing /home/malloc/mesa/include/GLES3/gl3ext.h to /usr/include/GLES3
Installing /home/malloc/mesa/include/GLES3/gl3platform.h to /usr/include/GLES3
Installing /home/malloc/mesa/include/GL/gl.h to /usr/include/GL
Installing /home/malloc/mesa/include/GL/glcorearb.h to /usr/include/GL
Installing /home/malloc/mesa/include/GL/glext.h to /usr/include/GL
Installing /home/malloc/mesa/include/GL/glx.h to /usr/include/GL
Installing /home/malloc/mesa/include/GL/glxext.h to /usr/include/GL
Installing /home/malloc/mesa/include/EGL/egl.h to /usr/include/EGL
Installing /home/malloc/mesa/include/EGL/eglext.h to /usr/include/EGL
Installing /home/malloc/mesa/include/EGL/eglplatform.h to /usr/include/EGL
Installing /home/malloc/mesa/include/EGL/eglmesaext.h to /usr/include/EGL
Installing /home/malloc/mesa/include/EGL/eglextchromium.h to /usr/include/EGL
Installing /home/malloc/mesa/include/GL/internal/dri_interface.h to /usr/include/GL/internal
Installing /home/malloc/mesa/src/gbm/main/gbm.h to /usr/include
Installing /home/malloc/mesa/src/util/00-mesa-defaults.conf to /usr/share/drirc.d
Installing /home/malloc/mesa/build/meson-private/glesv1_cm.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/malloc/mesa/build/meson-private/glesv2.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/malloc/mesa/build/meson-private/dri.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/malloc/mesa/build/meson-private/gbm.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/malloc/mesa/build/meson-private/egl.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/malloc/mesa/build/meson-private/gl.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Running custom install script '/usr/bin/python3 /home/malloc/mesa/bin/install_megadrivers.py /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so /usr/lib/aarch64-linux-gnu/dri armada-drm_dri.so exynos_dri.so hx8357d_dri.so ili9225_dri.so ili9341_dri.so imx-drm_dri.so ingenic-drm_dri.so mcde_dri.so meson_dri.so mi0283qt_dri.so mxsfb-drm_dri.so pl111_dri.so repaper_dri.so rockchip_dri.so st7586_dri.so st7735r_dri.so stm_dri.so sun4i-drm_dri.so panfrost_dri.so'
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/armada-drm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/exynos_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/hx8357d_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/ili9225_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/ili9341_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/imx-drm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/ingenic-drm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/mcde_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/meson_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/mi0283qt_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/mxsfb-drm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/pl111_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/repaper_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/rockchip_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/st7586_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/st7735r_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/stm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/sun4i-drm_dri.so
installing /home/malloc/mesa/build/src/gallium/targets/dri/libgallium_dri.so to /usr/lib/aarch64-linux-gnu/dri/panfrost_dri.so

After all apt update and upgrade and reboot and openGL renderer mesa 20.0.4 instead 20.1.0, version I have compiled and in theory installed..

 

Thank you

Link to comment
Share on other sites

  • Werner locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines