jerryn Posted December 16, 2018 Share Posted December 16, 2018 I need one more component working. 3D and OpenCL. Has anyone successfully installed Panfrost on a RK3399 board ? Update! I manged to build the Panfrost X11 driver. Here's how I did it: https://panfrost.freedesktop.org/building-panfrost-mesa.html Before you create the build directory update the meson_options.txt file change platforms from auto to x11 change dri_driver from auto to swrast change gallium-drivers to panfrost cd to the build directory meson .. . -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost -Dlibunwind=false --prefix=/{wherever you want} ninja install before you start a program export LD_LIBRARY_PATH=/{wherever your path is} glmark2-es2 When I get home from work I will test further. I will update later. I wanted to post just in case anyone else wishes to try it. I got to go to sleep, work tomorrow. Link to comment Share on other sites More sharing options...
@lex Posted December 16, 2018 Share Posted December 16, 2018 I have been playing with T86x on my NanoPi M4 and i can say 3D and OpenCL are working fine with the mali userspace blobs. This blob setup below can save you a lot of sweat unless you really want to go with Panfrost. I can run Kodi 18b5, which renders menu and video on mali. Blobs used: https://github.com/avafinger/nanopi-m4-ubuntu-base-minimal/releases/tag/v1.2.1 Link to comment Share on other sites More sharing options...
codnoscope Posted December 17, 2018 Share Posted December 17, 2018 Hey Jerryn I tried to build the panfrost following the instructions on the freedesktop.org but given up after a couple hours of trying to get all the build dependencies working. panfrost requires libs that are a bit newer than what is shipped with armbian, so apt all the devel package won't work. Would be interesting to find out what kind of distribution the panfrost people are using, surely they have a script to clone dependency trees automatically. Just an unrelated observation, the panfrost people seems to prefer chromebooks over dev boards Link to comment Share on other sites More sharing options...
jerryn Posted December 18, 2018 Author Share Posted December 18, 2018 Thanks. I'll start with the avafinger repo. Link to comment Share on other sites More sharing options...
jerryn Posted December 19, 2018 Author Share Posted December 19, 2018 On 12/16/2018 at 9:59 PM, @lex said: I have been playing with T86x on my NanoPi M4 and i can say 3D and OpenCL are working fine with the mali userspace blobs. This blob setup below can save you a lot of sweat unless you really want to go with Panfrost. I can run Kodi 18b5, which renders menu and video on mali. Blobs used: https://github.com/avafinger/nanopi-m4-ubuntu-base-minimal/releases/tag/v1.2.1 @lex I'm trying to use the mali userspace blobs. I used the link you sent. Here's what I see in the Xorg.0.log: I followed the instructions, installed the dependencies and default OpenGLES/GL/CL first. Is this error really due ot the xorg fbdev driver being loaded ? [ 1812.163] (II) LoadModule: "fbdev" [ 1812.163] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so [ 1812.163] (II) Module fbdev: vendor="X.Org Foundation" [ 1812.163] compiled for 1.19.3, module version = 0.4.4 [ 1812.163] Module class: X.Org Video Driver [ 1812.163] ABI class: X.Org Video Driver, version 23.0 [ 1812.163] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 1812.163] (II) FBDEV: driver for framebuffer: fbdev [ 1812.241] (II) modeset(0): using drv /dev/dri/card0 [ 1812.241] (WW) Falling back to old probe method for fbdev [ 1812.241] (II) Loading sub module "fbdevhw" [ 1812.241] (II) LoadModule: "fbdevhw" [ 1812.241] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so [ 1812.242] (II) Module fbdevhw: vendor="X.Org Foundation" [ 1812.242] compiled for 1.19.6, module version = 0.0.2 [ 1812.242] ABI class: X.Org Video Driver, version 23.0 [ 1812.242] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support [ 1812.242] (II) modeset(0): Creating default Display subsection in Screen sect ion "Default Screen Section" for depth/fbbpp 24/32 [ 1812.242] (==) modeset(0): Depth 24, (==) framebuffer bpp 32 [ 1812.242] (==) modeset(0): RGB weight 888 [ 1812.242] (==) modeset(0): Default visual is TrueColor [ 1812.242] (II) Loading sub module "glamoregl" [ 1812.242] (II) LoadModule: "glamoregl" [ 1812.243] (II) Loading /usr/lib/xorg/modules/libglamoregl.so [ 1812.268] (II) Module glamoregl: vendor="X.Org Foundation" [ 1812.268] compiled for 1.19.6, module version = 1.0.0 [ 1812.268] ABI class: X.Org ANSI C Emulation, version 0.4 [ 1812.268] (II) glamor: OpenGL accelerated X.org driver based. [ 1812.271] (II) glamor: EGL version 1.4 Midgard-"r14p0-01rel0": [ 1812.272] EGL_MESA_drm_image required. [ 1812.272] (EE) modeset(0): glamor initialization failed Link to comment Share on other sites More sharing options...
@lex Posted December 19, 2018 Share Posted December 19, 2018 Did you link to X11? Link to comment Share on other sites More sharing options...
jerryn Posted December 19, 2018 Author Share Posted December 19, 2018 Yes I did. rwxrwxrwx 1 root root 29 Dec 19 01:27 libMali.so -> libmali-midgard-t86x-r14p0.so What X11 X server do I need to run ? Link to comment Share on other sites More sharing options...
@lex Posted December 19, 2018 Share Posted December 19, 2018 (edited) Seems correct. I am not sure you can get 2D glamour decoration if it is that what you want. According to Rockchip doc no special X11 server. Did you test the usual glmark2-es2 ? Not working? Seems i was wrong: http://rockchip.wikidot.com/graphics Edited December 19, 2018 by @lex xserver Link to comment Share on other sites More sharing options...
@lex Posted December 20, 2018 Share Posted December 20, 2018 I tried to build the xserver based on Rockchip xserver (debian) on Ubuntu, not much success. Broke font displaying on Desktop. Maybe you could ask for the patch on the RK32xx section, they have it working (armhf). I will give another try. [ 12.433] (==) modeset(0): Depth 24, (==) framebuffer bpp 32 [ 12.433] (==) modeset(0): RGB weight 888 [ 12.433] (==) modeset(0): Default visual is TrueColor [ 12.433] (II) Loading sub module "glamoregl" [ 12.433] (II) LoadModule: "glamoregl" [ 12.434] (II) Loading /usr/lib/xorg/modules/libglamoregl.so [ 12.907] (II) Module glamoregl: vendor="X.Org Foundation" [ 12.907] compiled for 1.19.6, module version = 1.0.0 [ 12.908] ABI class: X.Org ANSI C Emulation, version 0.4 [ 12.908] (II) glamor: OpenGL accelerated X.org driver based. [ 12.973] (II) glamor: EGL version 1.4 Midgard-"r14p0-01rel0": [ 12.973] EGL_KHR_surfaceless_gles2 required. [ 13.038] (II) modeset(0): Using GLES2. [ 13.038] (WW) modeset(0): Glamor is using GLES2 but GLX needs GL. Indirect GLX may not work correctly. [ 13.038] (II) modeset(0): glamor initialized [ 13.074] (II) modeset(0): Output HDMI-1 has no monitor section [ 13.074] (II) modeset(0): Output DP-1 has no monitor section [ 13.157] (II) modeset(0): EDID for output HDMI-1 [ 13.158] (II) modeset(0): Manufacturer: GSM Model: 1 Serial#: 16843009 [ 13.158] (II) modeset(0): Year: 2013 Week: 1 Link to comment Share on other sites More sharing options...
jock Posted December 20, 2018 Share Posted December 20, 2018 If you are using mainline kernel, maybe my armsoc X11 driver fork may work for you configuration. It has been developed on RK3288, but it seems it works good for RK3399 too. It does not require any special X server, just compile it against stock one. It should work well with 2D and give 3D for mali blobs. Some references are here Link to comment Share on other sites More sharing options...
jerryn Posted December 20, 2018 Author Share Posted December 20, 2018 Cool! I will try building the forked x11 server tonight. The 1080p video playback through fbdev is fine, no dropped frames. Mesa llvm... 1080p OpenGLis a slow slide show. GLmark2-es2 full screen 23 frames /. Sec Whats the benchmark with the Mali Blo s ? Is the Mali T860 blob driver capable at 1080p ? Link to comment Share on other sites More sharing options...
@lex Posted December 20, 2018 Share Posted December 20, 2018 (edited) If you get the xserver on Ubuntu (deb packages), please make a patch. Seems everyone else is using the Debian version which is older than Ubuntu. jock's solution sounds good to implement, maybe it works only on mainline. Glmark2-es2 23 FPS scores look more rendered by software than by mali. On Mali, it should be 55 / 56 FPS (1920x1080). * When i say fbdev i mean everything is rendered directly on /dev/fb0 and not having a Desktop and going CTRL+ALT+F1 to get into console ( framebuffer ) Edited December 20, 2018 by @lex framebuffer Link to comment Share on other sites More sharing options...
jerryn Posted December 21, 2018 Author Share Posted December 21, 2018 On 12/17/2018 at 8:41 AM, codnoscope said: Hey Jerryn I tried to build the panfrost following the instructions on the freedesktop.org but given up after a couple hours of trying to get all the build dependencies working. panfrost requires libs that are a bit newer than what is shipped with armbian, so apt all the devel package won't work. Would be interesting to find out what kind of distribution the panfrost people are using, surely they have a script to clone dependency trees automatically. Just an unrelated observation, the panfrost people seems to prefer chromebooks over dev boards On 12/17/2018 at 8:41 AM, codnoscope said: Do you have a link t Link to comment Share on other sites More sharing options...
jerryn Posted December 21, 2018 Author Share Posted December 21, 2018 (edited) I built Jock's forked X11 armsoc driver, Installed and configured the Malie BLOB rpm and configured for X11. Rebooted. I ran glmark2-es2 : ======================================================= root@nanopct4:~/Desktop# glmark2-es2 --fullscreen ======================================================= 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: 11 FrameTime: 90.909 ms [build] use-vbo=true: FPS: 13 FrameTime: 76.923 ms ======================================================= glmark2 Score: 12 ======================================================= I checked the Xorg.0.log.. armsock_dri isn't installed. Isn't that part of the armsoc driver build ? [ 732.501] (EE) AIGLX error: dlopen of /usr/lib/aarch64-linux-gnu/dri/armsoc_d ri.so failed (/usr/lib/aarch64-linux-gnu/dri/armsoc_dri.so: cannot open shared o bject file: No such file or directory) Without armsoc_dri I'm stuck software rendering. If you have armsoc_dri.so can you attach it to this thread ? I'm pretty sure I'm getting close to getting hardware acceleration working on my nanopc-t4 Edited December 21, 2018 by jerryn Update 1 Link to comment Share on other sites More sharing options...
jerryn Posted December 21, 2018 Author Share Posted December 21, 2018 It's beginning to WORK! What I did was search for the Mesa Libraries, remove them. run ldconfig. Install Jocks's X11 Armsoc Driver, Install @lex's Midgard Mali T86 Blobs. run mali-config.sh for x11. At first I though not successfull because glmark2-es2 has poor benchmarks. I compiled and installed the GL4ES wrapper, and updated my xorg.conf.d configurations. Here's what's working: If you look the config over and notice someting that will slow down glmark2-es2 , please let me know. bzflag is playable at full 1080p, High Quality setting. Armegetron plays well 1080p, all options turned up. Pretty soon I will be able to experiment with GnuRadio and get the more complex configurations that require a GPU running. I am not sure why Supertuxkart does not work. Maybe gl4es does not support some of the GL code used ? I will attach a screenshot to this, if anyone knows, please update the thread. Thanks everyone for your help! 10-armsoc.conf ----------------------- Section "Module" Disable "glx" Load "dri2" Load "glamoregl" EndSection Section "Device" Identifier "Mali FBDEV" Driver "armsoc" # Option "fbdev" "/dev/fb0" Option "Fimg2DExa" "false" Option "DRI2" "true" Option "DRI" "2" Option "DRI2_PAGE_FLIP" "false" # Option "DRI2_WAIT_VSYNC" "true" Option "AccelMethod" "glamor" # Option "Fimg2DExaSolid" "false" # Option "Fimg2DExaCopy" "false" # Option "Fimg2DExaComposite" "false" Option "SWcursorLCD" "false" Option "UMP_LOCK" "false" EndSection Section "Screen" Identifier "Default Screen" SubSection "Display" Depth 24 Modes "1920x1080" "1280x1024" "1024x768" "800x600" EndSubSection 20-modesetting.conf ------------------------------ Section "Device" Identifier "Rockchip Graphics" Driver "modesetting" Option "AccelMethod" "glamor" Option "Dri2Vsync" "false" EndSection Link to comment Share on other sites More sharing options...
jerryn Posted December 21, 2018 Author Share Posted December 21, 2018 Update. With GL4ES we have OpenGL 2.1. It's not adequate for Dolphin. The version in the Armbian repo does not support EGL. I'll download the source from GIT and compile/test an EGL version. Right now I am building apps that will work. GQRZ works, now I am building an optimized version of CubicSDR. Maye tonight I'll try to get the Pothos Suite built. OpenGL 2.1 should be fine for LiquidDSP. Building a portable SDR with the NanoPC-T4 looks promising! Building a Gaming Media Center.. well I've got the Media Center working, but gaming is going to take some work yet. Link to comment Share on other sites More sharing options...
jock Posted December 21, 2018 Share Posted December 21, 2018 Ahhh, mixing modesetting and armsoc is not a wise idea, actually I don't know what is going to be chosen by X11 server. I have my own rule for xorg.conf files: the less configuration you write the best it performs. Nowadays X.org is doing good job at autoconfiguring itself, and the configuration files are there for "little" adjustments. Normally, for example, modelines and resolutions are autodetected by the driver and you should not specify them manually (you can also take a look to the detected modelines in /var/log/Xorg.0.log file if you want). Normally to enable armsoc you just need: Section "Device" Identifier "Mali FBDEV" Driver "armsoc" EndSection in 10-armsoc.conf, leave also the "default" armbian configuration file (which should be already in xorg.conf.d directory) and remove everything else. Most of the all the other settings are bogus things you can find in various forum threads. People added them without knowing anything of the driver or mixing configuration options from other drivers, in fact there are no references to such options in the source code. About the missing armsoc_dri.so file, this is expected but should not be harmful for OpenGL ES applications. The slow performance of glmark2 can be related to the very old packaged version shipped with ubuntu/debian. Usually it is always suggested to compile the latest stable source code from sources (which I think can be downloaded from github) for reliable and up-to-date performance. @JMCC is working on a script which install all the drivers and some goodies for RK3399 devices. He already did such script for RK3288 and it is the reference for all the multimedia things for that platform. Link to comment Share on other sites More sharing options...
Myy Posted December 22, 2018 Share Posted December 22, 2018 5 hours ago, jerryn said: I remember having similar issues when coding a visualizer with OpenGL, on a Nvidia/Intel laptop. Turned out that I didn't set up the texture sampler correctly while the documentation clearly stated that not doing so might result in black sampling (aka. (R, G, B, A) = (0, 0, 0, 1) in Khronos terms). In my case, the mipmaps that were not setup... Mipmaps are triggered mostly when the texture is bigger than the area to draw. I don't know if you can select output quality on SuperTuxKart, but if you can, try setting as low as possible and see if that still generates issues. Try also expanding the window and see if the black squares expand a little more. "Maybe" SuperTuxKart does not set up the textures, and still run fine on some platforms that have decent default textures sampler parameters. Or maybe the drivers are just bugged. Still, if you can run "apitrace" on it, it might provide some OpenGL trace that you can playback on other machines, or share, to determine if the issue is a driver issue, or some non-conformant OpenGL call procedure. apitrace works like this : apitrace trace -a egl -o output-name.trace /path/to/your/opengl/program arguments to the program Link to comment Share on other sites More sharing options...
jerryn Posted December 22, 2018 Author Share Posted December 22, 2018 Thanks! Apparently the GL4ES wrapper does not support the opengl version than supertux requires: OpenGL: OpenGL version is too old! [info ] IrrDriver: OpenGL version string: 2.0 gl4es wrapper 1.1.1 [warn ] Graphics: Can not find version for '2.0 gl4es wrapper 1.1.1' 'GL4ES wrapper' - ignored. [warn ] irr_driver: Using the fixed pipeline (old GPU, or shaders disabled in options) I'm goig to recompile the wrapper, maybe it wasn't build for OpenGL 2.0 support. Link to comment Share on other sites More sharing options...
jock Posted December 22, 2018 Share Posted December 22, 2018 3 hours ago, jerryn said: Thanks! Apparently the GL4ES wrapper does not support the opengl version than supertux requires: OpenGL: OpenGL version is too old! [info ] IrrDriver: OpenGL version string: 2.0 gl4es wrapper 1.1.1 [warn ] Graphics: Can not find version for '2.0 gl4es wrapper 1.1.1' 'GL4ES wrapper' - ignored. [warn ] irr_driver: Using the fixed pipeline (old GPU, or shaders disabled in options) I'm goig to recompile the wrapper, maybe it wasn't build for OpenGL 2.0 support. you can export LIBGL_ES=2 environment variable and retry launching the binary. Normally GL4ES supports a variety of OpenGL 2 functions, but some are missing. The documentation on official github page covers them in detail Link to comment Share on other sites More sharing options...
jerryn Posted December 22, 2018 Author Share Posted December 22, 2018 I rebuilt Supertuxkart with OpenGLES 3 support. It works but I need to get a fan. My board is runing at 85C right now. I'm working on rebuilding CubucSDR. Rebuilding Wxwidgets .. hopefully will work with gl4es. I'm also working on fixing plexmediaplayer.. after I installed gl4es, plexmediaplayer segfaults. ran gdb and did an apitrace. Link to comment Share on other sites More sharing options...
NicoD Posted December 24, 2018 Share Posted December 24, 2018 On 12/22/2018 at 8:30 PM, jerryn said: I'm also working on fixing plexmediaplayer.. after I installed gl4es, plexmediaplayer segfaults. ran gdb and did an apitrace. Have you tried the newest FriendlyCore image? I just red it should support 4k video decoding. 17.1 2018-12-19 FriendlyCore is updated as follows: 1) Added OV13850 and wide dynamic OV4689 camera support 2) Added ffmpeg support, provides static libraries and header files, supports 4K hardware decoding (does not support hardware encoding) 3) Added mpv player, supports 4K hardware decoding I'll try it later in the week. I want SuperTuxKart too, if you're ready, please share. Thanks. Link to comment Share on other sites More sharing options...
jerryn Posted December 29, 2018 Author Share Posted December 29, 2018 I managed to get everything working in Armbian. I left the board running Armagetron AI matches overnight to burn it in with all graphics options turned up. My board failed.. It no longer boots. When looking at the status led it does not flash. I tried maskedrom boot off the sdcard, nothing. The last time I checked the CPU temp while the burn-in was running was 64C. Not enough to destroy the board at all. Amazon is sending me a replacement. I should have another board to experiment with sometime next week. Link to comment Share on other sites More sharing options...
SimonH Posted January 9, 2019 Share Posted January 9, 2019 Tomeu Vizoso from Collabora wrote a blog post: A Panfrost milestone (January 7, 2019) Link to comment Share on other sites More sharing options...
JMCC Posted January 10, 2019 Share Posted January 10, 2019 RK3399 media script released: Link to comment Share on other sites More sharing options...
Merblud Posted January 21, 2019 Share Posted January 21, 2019 Hi. Why is the 2d drawing in X11 so slow? If you use mali blobs, the scrolling in the Windows is delayed, moving the Windows is done with jerks. Even when display compositing is enabled, you can see how the under level Windows are redrawn in parts. If you do not use mali blobs, the scrolling in the Windows is excellent. But the Windows move slowly. When the compositing is disabled, the window can reach several (5-7) seconds. One would think that the graphics accelerator and processor are slow. But I have experience using weaker devices (e.g. tegra k1 or exynos with mali t6xx). There such delays are not observed even in the mode without hardware acceleration. Link to comment Share on other sites More sharing options...
jerryn Posted March 11, 2019 Author Share Posted March 11, 2019 Check to see if you are actually utilizing the blobs. You can check your Xorg logs to see if the driver is fully loading, because if it doesn't , depending on your X config, it could fall back to X11/fbdev I had full Mali support running. For burn-in I left Armagatrond running and video for my Plex server transcoding in the background. My nanopct4 failed and would no longer boot. I shipped it back to Amazon and they sent me a replacement. I've since scrapped using the nanopct4 as a media device / Dolphin EMU game platform. Now I am only using the nanopct4 as a media storage device and backup server. Now my media device / Steam game playform is an Intel NUC. At least the Intel GPU is well supported, no need to deal with blobs. And It did not burn up during "burn-in". I might use the nanopct4 as an Arduinio controller. But I still would want to see a fully Linux supported GPU. (waveform display) Also.. EGL belongs with Android, I want OpenGL 3+ on ARM. I don't think the T860 is slow. I think the T860 support is sub par. Link to comment Share on other sites More sharing options...
ayaromenok Posted March 12, 2019 Share Posted March 12, 2019 (edited) 20 hours ago, jerryn said: EGL belongs with Android, I want OpenGL 3+ on ARM. it does not belong to anything specific - it's just a glue to window system (like GLX,WGL,AGL,etx). and it's up to vendor to support it or no, as well as Desktop OpenGL. If you want OpenGL 3(or higher) on ARM - only NVidia Tegra and their Jetson boards have full support of both OpenGL for Desktop and for Embeded Systems(aka ES) on Linux/arm, as well as GLX and EGL window glue. And it's hard to believe, that ARM proprietary drivers or Biforst/Mesa will have similar to Nvidia level of OpenGL support under Linux/Android (and yes, you can use Desktop OpenGL on Nvidia android tablet/tv box too ). Edited March 12, 2019 by Tido updated info about NV/Android Link to comment Share on other sites More sharing options...
Merblud Posted October 13, 2019 Share Posted October 13, 2019 Xfce work successfully with panfrost (mesa 19.2, nanopc-t4). Link to comment Share on other sites More sharing options...
Recommended Posts