Giter VIP home page Giter VIP logo

avafinger / mali-fbdev-stress-test-tools Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 5.0 37.38 MB

Mali framebuffer stress test tools and some experiments ( fbdev ) - RK3399 / H2+ - OpenGLES2

Makefile 0.19% Java 1.09% GLSL 0.87% Shell 0.01% C++ 15.64% C 74.28% Assembly 1.31% CMake 0.13% Python 6.26% M4 0.22%
rk3399 arm64 armhf framebuffer yagears-fbdev bionic xenial fbdev nanopi-m4 banana-pi

mali-fbdev-stress-test-tools's Introduction

mali-fbdev-stress-test-tools

Mali framebuffer stress test tools and some experiments ( fbdev ) - RK3399 / H2+ / A64 - OpenGL ES2

* yagears-fbdev
* glmark2-2014.03-fbdev

mali test

yagears-fbdev

yagears is a version of the popular gears OpenGL ES 2.0 demo ported to framebuffer (fbdev)

yagears-fbdev screenshot 1

glmark2-2014.03-fbdev

glmark2 is an OpenGL 2.0 and ES 2.0 benchmark ported to framebuffer (fbdev)

glmark2-2014.03-fbdev.png screenshot 1

Benchmark samples (for reference)

SBC Dev Board sample NanoPi M4 OrangePi H6 BananaPi M2 Zero NanoPi A64
kernel version 4.4.163 3.10.65 4.18.17 4.4.111
cpu model RK3399 H6 H2+ A64
cpu % usage ~92.1% (yagears-fbdev avg) ~91.6% (yagears-fbdev avg) ~89.3% %
mali model Mali-T860 Mali-T720 Mali-400 Mali-400
mali gpu ver. (kernel) Mali-T86x MP4 r2p0 0x0860 Mali-T72x MP2 r1p1 0x0720 Mali-400 MP TBC
yagears-fbdev 60 FPS / 1920x1080 surface size 11 FPS / 1920x1080 surface size 59 FPS / 1920x1080 surface size TBC
yagears-x11 58 FPS / 1920x1080 surface size NA NA TBC
glmark2-2014.03-fbdev 55 (score) 1920x1080 10 (score) 1920x1080 45 (score) 1920x1080 TBC
glmark2-2014.03-x11 47 (score) 1920x1080 * NA NA NA

ps: For some weird reason, the mali performance was poor on the OrangePi H6 Plus, i tried to increase CMA memory but that did not help.

  • kernel 4.4.143 (FE)

Running the tools on mali framebuffer setup

Before you run the tools you need to have a valid mali device running in framebuffer mode.

  • yagears-fbdev (running on NanoPi M4 RK3399)

      sudo su
      export KEYBOARD=/dev/input/event2
      ./yagears-fbdev -b egl-fbdev -e glesv2
    

    output:

      Gears demo: 60.00 fps
      OpenGL ES 3.2 v1.r14p0-01rel0-git(966ed26).8ddd46e6c6dd560a57bab225c837a596
      OpenGL ES GLSL ES 3.20
      EGL 1.4 (depth 24, red 8, green 8, blue 8, alpha 8)
    

    You can use the keyboard to change the view and camera position

    The mali on NanoPi M4 performs as good as my good old NVIDIA on Intel dual-core on X11:

       ./yagears -b gl-x11 -e glesv2
      Gears demo: 60.11 fps
      3.3.0 NVIDIA 304.135
      3.30 NVIDIA via Cg compiler
      GLX 1.4 (depth 24, red 8, green 8, blue 8, alpha 0)
      
      ./yagears -b gl-x11 -e gl
      Gears demo: 60.32 fps
      3.3.0 NVIDIA 304.135
      GLX 1.4 (depth 24, red 8, green 8, blue 8, alpha 0)
    
      the smoothed reendering (anti-aliased) is with:
      ./yagears-gui -t glut -e gl
    
  • glmark2-2014.03-fbdev

    bionic (arm64)

      cd mali-fbdev-stress-test-tools/deb/arm64/bionic
      sudo dpkg -i glmark2-data_2014.03+git20150611.fa71af2d-0ubuntu5_all.deb
      sudo dpkg -i glmark2-es2-fbdev_2014.03+git20150611.fa71af2d-0ubuntu5_arm64.deb 
    

    xenial (arm64)

      cd mali-fbdev-stress-test-tools/deb/arm64/xenial
      sudo dpkg -i glmark2-data_2014.03+git20150611.fa71af2d-0ubuntu5_all.deb
      sudo dpkg -i glmark2-es2-fbdev_2014.03+git20150611.fa71af2d-0ubuntu5_arm64.deb
    

    xenial (armhf)

      cd mali-fbdev-stress-test-tools/deb/armhf/xenial
      sudo dpkg -i glmark2-data_2014.03+git20150611.fa71af2d-0ubuntu5_all.deb
      sudo dpkg -i glmark2-es2-fbdev_2014.03+git20150611.fa71af2d-0ubuntu5_armhf.deb
    

    run:

      sudo glmark2-es2-fbdev 
    

    output:

      =======================================================
          glmark2 2014.03+git20150611.fa71af2d
      =======================================================
          OpenGL Information
          GL_VENDOR:     ARM
          GL_RENDERER:   Mali-T860
          GL_VERSION:    OpenGL ES 3.2 v1.r14p0-01rel0-git(966ed26).8ddd46e6c6dd560a57bab225c837a596
      =======================================================
      [build] use-vbo=false: FPS: 60 FrameTime: 16.667 ms
      [build] use-vbo=true: FPS: 60 FrameTime: 16.667 ms
      [texture] texture-filter=nearest: FPS: 60 FrameTime: 16.667 ms
      [texture] texture-filter=linear: FPS: 60 FrameTime: 16.667 ms
      [texture] texture-filter=mipmap: FPS: 60 FrameTime: 16.667 ms
      [shading] shading=gouraud: FPS: 60 FrameTime: 16.667 ms
      [shading] shading=blinn-phong-inf: FPS: 60 FrameTime: 16.667 ms
      [shading] shading=phong: FPS: 60 FrameTime: 16.667 ms
      [shading] shading=cel: FPS: 60 FrameTime: 16.667 ms
      [bump] bump-render=high-poly: FPS: 59 FrameTime: 16.949 ms
      [bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
      [bump] bump-render=height: FPS: 60 FrameTime: 16.667 ms
      [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 60 FrameTime: 16.667 ms
      [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 35 FrameTime: 28.571 ms
      [pulsar] light=false:quads=5:texture=false: FPS: 60 FrameTime: 16.667 ms
      [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 58 FrameTime: 17.241 ms
      [desktop] effect=shadow:windows=4: FPS: 60 FrameTime: 16.667 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 29 FrameTime: 34.483 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 29 FrameTime: 34.483 ms
      [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 49 FrameTime: 20.408 ms
      [ideas] speed=duration: FPS: 59 FrameTime: 16.949 ms
      [jellyfish] <default>: FPS: 60 FrameTime: 16.667 ms
      [terrain] <default>: FPS: 19 FrameTime: 52.632 ms
      [shadow] <default>: FPS: 59 FrameTime: 16.949 ms
      [refract] <default>: FPS: 56 FrameTime: 17.857 ms
      [conditionals] fragment-steps=0:vertex-steps=0: FPS: 60 FrameTime: 16.667 ms
      [conditionals] fragment-steps=5:vertex-steps=0: FPS: 60 FrameTime: 16.667 ms
      [conditionals] fragment-steps=0:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
      [function] fragment-complexity=low:fragment-steps=5: FPS: 60 FrameTime: 16.667 ms
      [function] fragment-complexity=medium:fragment-steps=5: FPS: 59 FrameTime: 16.949 ms
      [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 59 FrameTime: 16.949 ms
      [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
      [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 59 FrameTime: 16.949 ms
      =======================================================
                                        glmark2 Score: 55 
      =======================================================
    

    output X11 (FriendlyElec Image):

      glmark2-es2 -s 1920x1080
      =======================================================
          glmark2 2014.03+git20150611.fa71af2d
      =======================================================
          OpenGL Information
          GL_VENDOR:     ARM
          GL_RENDERER:   Mali-T860
          GL_VERSION:    OpenGL ES 3.2 v1.r14p0-01rel0-git(966ed26).f44c85cb3d2ceb87e8be88e7592755c3
      =======================================================
      [build] use-vbo=false: FPS: 45 FrameTime: 22.222 ms
      [build] use-vbo=true: FPS: 42 FrameTime: 23.810 ms
      [texture] texture-filter=nearest: FPS: 49 FrameTime: 20.408 ms
      [texture] texture-filter=linear: FPS: 59 FrameTime: 16.949 ms
      [texture] texture-filter=mipmap: FPS: 50 FrameTime: 20.000 ms
      [shading] shading=gouraud: FPS: 59 FrameTime: 16.949 ms
      [shading] shading=blinn-phong-inf: FPS: 30 FrameTime: 33.333 ms
      [shading] shading=phong: FPS: 30 FrameTime: 33.333 ms
      [shading] shading=cel: FPS: 59 FrameTime: 16.949 ms
      [bump] bump-render=high-poly: FPS: 59 FrameTime: 16.949 ms
      [bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
      [bump] bump-render=height: FPS: 60 FrameTime: 16.667 ms
      [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 60 FrameTime: 16.667 ms
      [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 30 FrameTime: 33.333 ms
      [pulsar] light=false:quads=5:texture=false: FPS: 59 FrameTime: 16.949 ms
      [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 29 FrameTime: 34.483 ms
      [desktop] effect=shadow:windows=4: FPS: 59 FrameTime: 16.949 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 19 FrameTime: 52.632 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 18 FrameTime: 55.556 ms
      [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 17 FrameTime: 58.824 ms
      [ideas] speed=duration: FPS: 42 FrameTime: 23.810 ms
      [jellyfish] <default>: FPS: 45 FrameTime: 22.222 ms
      [terrain] <default>: FPS: 14 FrameTime: 71.429 ms
      [shadow] <default>: FPS: 59 FrameTime: 16.949 ms
      [refract] <default>: FPS: 29 FrameTime: 34.483 ms
      [conditionals] fragment-steps=0:vertex-steps=0: FPS: 59 FrameTime: 16.949 ms
      [conditionals] fragment-steps=5:vertex-steps=0: FPS: 59 FrameTime: 16.949 ms
      [conditionals] fragment-steps=0:vertex-steps=5: FPS: 59 FrameTime: 16.949 ms
      [function] fragment-complexity=low:fragment-steps=5: FPS: 60 FrameTime: 16.667 ms
      [function] fragment-complexity=medium:fragment-steps=5: FPS: 60 FrameTime: 16.667 ms
      [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
      [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 60 FrameTime: 16.667 ms
      [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 59 FrameTime: 16.949 ms
      =======================================================
                                        glmark2 Score: 47 
      =======================================================
    
  • glmark2-es2 Intel NVIDIA 340 X11 (as a reference)

    output:

          sudo glmark2-es2 -s 1920x1080
          libEGL warning: DRI2: failed to authenticate
      =======================================================
          glmark2 2014.03+git20150611.fa71af2d
      =======================================================
          OpenGL Information
          GL_VENDOR:     VMware, Inc.
          GL_RENDERER:   llvmpipe (LLVM 6.0, 128 bits)
          GL_VERSION:    OpenGL ES 3.0 Mesa 18.0.5
      =======================================================
      [build] use-vbo=false: FPS: 43 FrameTime: 23.256 ms
      [build] use-vbo=true: FPS: 44 FrameTime: 22.727 ms
      [texture] texture-filter=nearest: FPS: 46 FrameTime: 21.739 ms
      [texture] texture-filter=linear: FPS: 42 FrameTime: 23.810 ms
      [texture] texture-filter=mipmap: FPS: 31 FrameTime: 32.258 ms
      [shading] shading=gouraud: FPS: 45 FrameTime: 22.222 ms
      [shading] shading=blinn-phong-inf: FPS: 41 FrameTime: 24.390 ms
      [shading] shading=phong: FPS: 39 FrameTime: 25.641 ms
      [shading] shading=cel: FPS: 37 FrameTime: 27.027 ms
      [bump] bump-render=high-poly: FPS: 34 FrameTime: 29.412 ms
      [bump] bump-render=normals: FPS: 52 FrameTime: 19.231 ms
      [bump] bump-render=height: FPS: 51 FrameTime: 19.608 ms
      [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 32 FrameTime: 31.250 ms
      [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 20 FrameTime: 50.000 ms
      [pulsar] light=false:quads=5:texture=false: FPS: 46 FrameTime: 21.739 ms
      [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 12 FrameTime: 83.333 ms
      [desktop] effect=shadow:windows=4: FPS: 22 FrameTime: 45.455 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 35 FrameTime: 28.571 ms
      [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 35 FrameTime: 28.571 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: 41 FrameTime: 24.390 ms
      [jellyfish] <default>: FPS: 23 FrameTime: 43.478 ms
      [terrain] <default>: FPS: 1 FrameTime: 1000.000 ms
      [shadow] <default>: FPS: 22 FrameTime: 45.455 ms
      [refract] <default>: FPS: 6 FrameTime: 166.667 ms
      [conditionals] fragment-steps=0:vertex-steps=0: FPS: 49 FrameTime: 20.408 ms
      [conditionals] fragment-steps=5:vertex-steps=0: FPS: 39 FrameTime: 25.641 ms
      [conditionals] fragment-steps=0:vertex-steps=5: FPS: 49 FrameTime: 20.408 ms
      [function] fragment-complexity=low:fragment-steps=5: FPS: 47 FrameTime: 21.277 ms
      [function] fragment-complexity=medium:fragment-steps=5: FPS: 42 FrameTime: 23.810 ms
      [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 47 FrameTime: 21.277 ms
      [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 47 FrameTime: 21.277 ms
      [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 42 FrameTime: 23.810 ms
      =======================================================
                                        glmark2 Score: 36 
      =======================================================
    

Building from source

Build instructions are provided for Ubuntu 18.04 (bionic) / Ubuntu 16.04 (xenial) and arm64 and armhf

Please install all the dependencies first and then run in shell:

  • glmark2-2014.03-fbdev

      cd mali-fbdev-stress-test-tools/src/glmark2-2014.03-fbdev
      sudo dpkg-buildpackage -uc -us
    

the packages will be built in /arm/temp/temp/mali-fbdev-stress-test-tools/src

  • yagears-fbdev

      cd mali-fbdev-stress-test-tools/src/yagears-fbdev
      autoreconf -fvi
      make
    

Credits

  • FriendlyElec and Nora Lee for the samples
  • Steven for some shipping arrangments
  • Jernejsk for the Mali user space (OrangePi H6)
  • MRipard for the Mali on mainline kernel
  • Khadas member team for the initial version
  • Armbian for the otimizations/overclocking

mali-fbdev-stress-test-tools's People

Contributors

avafinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mali-fbdev-stress-test-tools's Issues

Hard Lock - [build] use-vbo=false:

Hi

So I've been working on getting the Mali blob to run on our target board; OrangePi Zero H3 Plus2.
The goal is to get FBDEV acceleration using the existing binary blobs, currently a 800x800 LCD running over HDMI.

The build environment is Buildroot which is compiling kernel 5.4.13, Mali kernel drivers are the Mripard r6p2, userspace is the corresponding Bootlin blob for fbdev.

CMA and DMA_CMA flags are enabled, CMA is set at 128mb, FBDEV_OVERALLOC is 200.
Device tree is mainline and the device is probed successfully by mdev:

Starting mdev... OK
[    2.942554] mali: loading out-of-tree module taints kernel.
[    2.972766] Allwinner sunXi mali glue initialized
[    2.979874] Mali:
[    2.979882] Found Mali GPU Mali-400 MP r1p1
[    2.986758] Mali:
[    2.986762] 2+0 PP cores initialized
[    2.993136] Mali:
[    2.993141] Mali device driver loaded

I forked the glmark2-es2-fbdev code to my github and patched the waf libraries and config to compile under python3 so I could build a buildroot package - I added the following calls to the waf build script:

GLMARK2_FBDEV_CONF_OPTS += \
	--prefix=/usr \
	--with-flavors=$(subst $(space),$(comma),$(GLMARK2_FBDEV_FLAVORS)) \
	--with-mali \
	--no-werror

--with-mali as it seemed like an appropriate flag, --no-werror just to deal with some compiler warnings.

The package is now compiling and being installed to the target file system. However when I run I get the following:

# glmark2-es2-fbdev
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-400 MP
    GL_VERSION:    OpenGL ES 2.0
=======================================================
[build] use-vbo=false:

Screen goes black.
The system HARD locks, chip gets hot, nothing works! Cant force quit.
I tried again with nohup, to see if we were at 100% cpu but nohup hangs in the same way.

I'm a bit lost now, any ideas on how I can diagnose this one (or even check if the Mali driver is working?)

Thanks

Question about fbdev

Do you know how to get the fbdev driver installed on A64 hardware (like the NanoPI A64)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.