Jump to content

Orange PI PC2 / H5 mali blob


noblock

Recommended Posts

I just checked the mali blob: mali450r5p001rel0linux1fbdevarm64v8a (fbdev) and this blob is working on the legacy kernel with the proper patches.

 

Nevertheless we may have some stability issues at the current voltage/frequence; Indeed gl-mark2-es-fb crashes around the refract test on my board.

 

Link to comment
Share on other sites

Are people working on Mali450 drivers? I am really looking forward to using the PC2 for Retro Gaming and I understood that these drivers are needed for RetrOrangePi to work properly.

 

Until then I will be using the OPi PC :(

Edited by barrymossel
Apparently people are!
Link to comment
Share on other sites

Here are the steps to get a legacy H5 kernel running with Mali r5p0:

* Linux kernel from: https://github.com/OrangePiLibra/OrangePi_H5SDK

* Here is my legacy kernel generation script: https://pastebin.com/w1b4exzW

* Mali kernel module: DX910-SW-99002-r5p0-01rel0 from here: https://developer.arm.com/products/software/mali-drivers/utgard-kernel

* Mali kernel patch:  https://pastebin.com/VnJgZWZJ (name: DX910-SW-99002-r5p0-01rel0.patch)

* Blob: mali450r5p001rel0linux1fbdevarm64v8a

* Good benchmark/test utility: glmark2-es2-fb. The blob is a aarch64 one, so we must use a aarch64 linux environment to compile and run glmark2-es2-fb.

 

#script template:

#orangepi_h5sdk_dir link to repository: https://github.com/OrangePiLibra/OrangePi_H5SDK
yourkernelorangepih5sdkfullpath="<>"
f="DX910-SW-99002-r5p0-01rel0";rm -Rf mali_r5p0/;tar xf $f.tgz;(cd $f/;cat $f.patch|patch -p1);mv "$f/" mali_r5p0/; #mali450r5p001rel0linux1fbdevarm64v8a
mkdir -p mali_r5p0/driver/src/devicedrv/mali/include/linux/aw/sun50i/;
cp orangepi_h5sdk_dir/kernel/modules/gpu/mali450/kernel_mode/driver/src/devicedrv/mali/linux/mali_platform.c mali_r5p0/driver/src/devicedrv/mali/linux/mali_platform.c
cp -dpR orangepi_h5sdk_dir/kernel/modules/gpu/mali450/kernel_mode/driver/src/devicedrv/mali/include/linux/aw/platform.h mali_r5p0/driver/src/devicedrv/mali/include/linux/aw/
cp -dpR orangepi_h5sdk_dir/kernel/modules/gpu/mali450/kernel_mode/driver/src/devicedrv/mali/include/linux/aw/config.h mali_r5p0/driver/src/devicedrv/mali/include/linux/aw/
cp -dpR orangepi_h5sdk_dir/kernel/modules/gpu/mali450/kernel_mode/driver/src/devicedrv/mali/include/linux/aw/sun50i/sun50iw2p1.h mali_r5p0/driver/src/devicedrv/mali/include/linux/aw/sun50i/
sed -r -i "s/^(int mali_fb_start = )0(;)$/\10x7f040000\2/; s/^(int mali_fb_size = )0(;)$/\17372800\2/" mali_r5p0/driver/src/devicedrv/mali/common/mali_kernel_core.c; #from: fbset -i
#(cd mali_r5p0/driver/src/devicedrv/ump;(make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnueabihf- -j 8 KDIR=${yourkernelorangepih5sdkfullpath} V=1 BUILD=release))
(cd mali_r5p0/driver/src/devicedrv/mali;make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnueabihf- -j 8 KDIR=${yourkernelorangepih5sdkfullpath} V=1 USING_UMP=0 USING_DT=1 BUILD=release)

 

Link to comment
Share on other sites

This setup is now working using the mainline kernel (megous 4.14 and the following patch: https://github.com/noblock/sunxi-mali/blob/master/kernel-patches/9902-megous-add-h5-mali.patch). Using the same r5p0 blob:

 

Once you have the kernel, here is the mali kernel module (r5p0):

https://github.com/noblock/sunxi-mali

 

Here is the general information:

https://bootlin.com/blog/mali-opengl-support-on-allwinner-platforms-with-mainline-linux/

Link to comment
Share on other sites

Here is the glmark2-es2-fb output (hang at the refract test):

 

=======================================================
    glmark2 2014.03
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-450 MP
    GL_VERSION:    OpenGL ES 2.0
=======================================================
[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: 60 FrameTime: 16.667 ms
[bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=height: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[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: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[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: 52 FrameTime: 19.231 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 53 FrameTime: 18.868 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 60 FrameTime: 16.667 ms
[ideas] speed=duration: FPS: 60 FrameTime: 16.667 ms
[jellyfish] <default>: FPS: 60 FrameTime: 16.667 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[shadow] <default>: FPS: 60 FrameTime: 16.667 ms
[refract] <default>:

 

Link to comment
Share on other sites

Hi, it is not easy for me to understand this. Please let me know if I am thinking wrong: Blob is a piece of proprietary code released from a chip maker. In this case (witch I am interested on) Mali chip (450-400). It seems that Armbian and other TF images are released without Mali Drivers. So we have, yes, Single Board Computers, but we have not GPU drivers installed on them. Now, I am planning to install software that wants GPU driver installed. I have to search for a Blob. I have to install it on order to let SOC's GPU working. Right? Please could you tell me where I can find tutorial to do that? Thanks.

Link to comment
Share on other sites

You are right the blob: 'mali450r5p001rel0linux1fbdevarm64v8a' is the proprietary library executing the GLES operations on the mali 450. The linux GNU/GPL license is not compatible at all.

 

Indeed, we don't have a tutorial; On the framebuffer environement you just have to add the GLES headers on your gcc include directory, and add the 'blob' as a library.

 

Link to comment
Share on other sites

On 5/24/2018 at 4:38 AM, noblock said:

This setup is now working using the mainline kernel (megous 4.14 and the following patch: https://github.com/noblock/sunxi-mali/blob/master/kernel-patches/9902-megous-add-h5-mali.patch). Using the same r5p0 blob:

 

Once you have the kernel, here is the mali kernel module (r5p0):

https://github.com/noblock/sunxi-mali

 

Here is the general information:

https://bootlin.com/blog/mali-opengl-support-on-allwinner-platforms-with-mainline-linux/

Hi,  @noblock, I'am a new allwinner user,  I'am testing mali opengl,  when I compile your branch, an error occur,  my steps as below:

 

cd sunxi-mali
./wget_r5p0.sh
./build.sh -r r5p0 -b

building...
......
No series file found
Error applying patch

 

Link to comment
Share on other sites

On 5/24/2018 at 5:04 AM, noblock said:

Here is the glmark2-es2-fb output (hang at the refract test):

 

=======================================================
    glmark2 2014.03
=======================================================
    OpenGL Information
    GL_VENDOR:     ARM
    GL_RENDERER:   Mali-450 MP
    GL_VERSION:    OpenGL ES 2.0
=======================================================
[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: 60 FrameTime: 16.667 ms
[bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=height: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[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: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 60 FrameTime: 16.667 ms
libpng warning: iCCP: known incorrect sRGB profile
[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: 52 FrameTime: 19.231 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 53 FrameTime: 18.868 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 60 FrameTime: 16.667 ms
[ideas] speed=duration: FPS: 60 FrameTime: 16.667 ms
[jellyfish] <default>: FPS: 60 FrameTime: 16.667 ms
Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0
[terrain] <default>: Unsupported
[shadow] <default>: FPS: 60 FrameTime: 16.667 ms
[refract] <default>:

 

Hi @noblock,  (hang at the refract test) is it mean the mali-blobs it's bad?

Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines