XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by ARM

User avatar
odroid
Site Admin
Posts: 29671
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by ARM

Unread post by odroid » Sat Sep 19, 2015 4:57 pm

ARM has just released the meta-mali recipes with the recent r6p0 version for XU3/4 Mali-T628 GPU.

The meta-mali recipes have been updated with version meta-mali-003:
https://github.com/ARM-software/meta-ma ... a-mali-003

Download the user space driver from here. r12p0 is also available.
http://malideveloper.arm.com/resources/ ... e-drivers/

Also the Linux branch has been updated on their Github, the patches are also in meta-mali:
https://github.com/ARM-software/linux/t ... 0.y-mali-a

There is a kernel config option to enable VSYNC in fbdev, it's described in this commit:
https://github.com/ARM-software/linux/c ... 816530bebf

Note: We didn't update our Kernel driver and User-land driver with this release yet.
Let's evaluate this meta-mali recipes together if you are a developer. If everything goes well, we will merge this release into our Ubuntu BSP.


P/S.
In their BSP description : https://github.com/ARM-software/meta-mali
These recipes provide a BSP layer for ARM development platforms with ARM Mali technology enabled.
To build a minimal image using OpenEmbedded (OE) or Yocto/Poky for ODROID-XU3 which features a Mali-T62x GPU:

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 5:29 pm

I can already see a problem in that they made V-sync mandatory for FBIOPAN_DISPLAY.

This means rendering will never be faster than vsync and eglSwapInterval with 0 value will not work. Using other values for swap interval will also not be valid.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 5:37 pm

I think there needs to be an official test/beta version of this from HardKernel. This is going to be important to ensure we are using the same kernel patches, mali kernel driver, and mali userland driver. This will make issues reproducible for patching and/or reporting to ARM.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 6:03 pm

I notice they also enabled triple buffer. In an environment that is locked to vsync (60fps), triple buffering is not of any benefit.

There is no "Issues" on the ARM github repo, so I am unsure to whom I should be addressing these concerns.

In summary, they should be using FBIO_WAITFORVSYNC or calling DRM to do it rather than forcing it during pan. Somewhat ironically, they also currently do the pan wrong. They pan and then wait for vsync. As noted in the C1 thread, they should wait for vsync and then pan. The point of waiting for vsync is to ensure the pan occurs when the display is not being rasterized to the monitor.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 7:51 pm

I tried compiling the kernel tree from ARM, but it does not seem to work on XU4. It seems that it will need to be re-based on a more recent kernel to work.

[edit]
Doesn't seem to work on XU3 either. I get the following errors from systemd (on both XU3 and XU4) before being dumped to an emergency console.

Code: Select all

[ TIME ] Timed out waiting for device dev-ttySAC2.device.
[DEPEND] Dependency failed for Serial Getty on ttySAC2.
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-boot.device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/boot.
[DEPEND] Dependency failed for /media/boot.
[DEPEND] Dependency failed for Local File Systems.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sat Sep 19, 2015 9:11 pm

i patched the hk latest kernel and compiling atm for xu4.
first trying with vsync off, if that works i'll check with vsync on.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sat Sep 19, 2015 9:41 pm

quick update:

seems to be working! i did not enable vsync yet, i got 450fps in emulationstation (up from 20fps with r5p1) - still tearing (but not so visible as before because of higher fps i guess)
i tried Tekken3 in retroarch, constant 60fps (up from ~30fps with r5p1)

trying now vsync on.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sat Sep 19, 2015 9:47 pm

vsync on

tested on emulationstation, no more tearing, stable 60fps!
trying now some heavy ppsspp games :D

soulcalibur playing 60fps fullspeed at 4xpsp resolution, no frameskipping :twisted: :twisted: :twisted:

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 10:25 pm

I got the kernel from the arm tree to work. You need to modify the .config and set CONFIG_FHANDLE=y.

[edit]
Tested on XU3 and XU4 as working.
Last edited by crashoverride on Sat Sep 19, 2015 11:40 pm, edited 1 time in total.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sat Sep 19, 2015 10:43 pm

crashoverride wrote:I got the kernel from the arm tree to work. You need to modify the .config and set CONFIG_FHANDLE=y.
ah yes, you are then using ubuntu 15.04... i am using 14.04 so there is no need (no systemd).
in any case, here's a branch with my patches for the hk xu4 current branch: https://github.com/mihailescu2m/linux/t ... 0.y-memeka
this is kernel version 3.10.82, xu4 working, wifi dongle 4 working etc...

and here's emulationstation+ppsspp fbdev on xu4:
[youtube]https://www.youtube.com/watch?v=iVkMdObkTKg[/youtube]

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 10:48 pm

I got it up and running but I am still getting low FPS with my test program

Code: Select all

Version=OpenGL ES 3.1 v1.r6p0-02rel0.b77b627bc37583eeaa34bbee29868088
Renderer=Mali-T628
Extensions=GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer
FPS: 15
FPS: 14
FPS: 14
FPS: 14

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 10:51 pm

Ok, I re-ran it and now I get

Code: Select all

FPS: 483
FPS: 495
FPS: 495
FPS: 495
FPS: 495
FPS: 495
FPS: 494
FPS: 494
This test is the same one I posted for C1 that just clears the screen to a random color

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 10:52 pm

The difference between the two is that I had run a FBIOPAN_DISPLAY test before and the framebuffer was partially panned. This seems to make mali fallback to slow memcpy rendering.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 19, 2015 10:53 pm

As expected, eglSwapInterval is not functioning.

User avatar
meveric
Posts: 9690
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by meveric » Sun Sep 20, 2015 2:11 am

i just wished someone would fix that nasty black screen issue... It's still present in r6p0 :(
I can live with a little tearing, but i can't live with a board that's crashing every time i want to play something or watch a movie.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sun Sep 20, 2015 2:27 am

meveric wrote:i just wished someone would fix that nasty black screen issue
xf86-video-mali is included in the X11 download. It requires UMP headers though. It would be a good place to start to file bugs against to send back upstream to ARM.

[edit]
ARM is very well paid by licensees. There is no excuse for us to put up with issues like lack of proper vsync or working X11 drivers. The rational so far has been for them to say its the integrators job. However, these are issues against their own binary and source code. If they can't make it work, they certainly cant expect integrators to make it work. ;)

User avatar
meveric
Posts: 9690
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by meveric » Sun Sep 20, 2015 3:13 am

Problem is we don't use xf86-video-mali.. and that's probably part of the issue.. But then again, i wouldn't want to go back to the old ways of not being able to switch resolution.. without rebooting.
It's also causing many issues with programs that do not run in 1080p
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sun Sep 20, 2015 3:21 am

The release notes indicate that currently X11 and Wayland are unsupported. It does not say if they will be supported in the future.
https://github.com/ARM-software/meta-ma ... a-mali-003

For this release, I will be happy if we can get vsync support working properly (eglSwapInterval). Using a kernel config to enable/disable it is just an ugly hack.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sun Sep 20, 2015 3:33 am

Speaking of ugly hacks, I do not think the way this patch is implemented is a good idea at all
https://github.com/ARM-software/linux/c ... f61b79c401

I checked the 4.2 kernel source code and the relevant changes to fb.h and fbmem.c are not present. They should be staging that in the exynos fbdev driver until upstream decides its ok to make it a global change for all architectures and devices. As it stands now, this is just another reason to prevent the changes from being mainlined.

User avatar
AreaScout
Posts: 730
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by AreaScout » Sun Sep 20, 2015 4:05 am

could someone compile this little tool https://www.cl.cam.ac.uk/~cs448/git/tru ... /eglinfo.c with:

Code: Select all

gcc eglinfo.c -o eglinfo -lEGL -L/usr/lib
and post the output for the fbdev userspace libs ??

thanks in advance!

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sun Sep 20, 2015 8:32 am

Code: Select all

EGL API version: 1.4
EGL vendor string: ARM
EGL version string: 1.4 Midgard-"r6p0-02rel0"
EGL client APIs: OpenGL_ES
EGL extensions string:
     EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_create_context_robustness EGL_KHR_cl_event2
Configurations:
     bf lv d st colorbuffer dp st  ms    vis   supported
  id sz  l b ro  r  g  b  a th cl ns b    id   surfaces 
--------------------------------------------------------
0x01 32  0 y  .  8  8  8  8  0  0  0 0  0x00   win,pb,pix  
0x02 32  0 y  .  8  8  8  8 24  0  0 0  0x00   win,pb,pix  
0x03 32  0 y  .  8  8  8  8 24  8  0 0  0x00   win,pb,pix  
0x04 32  0 y  .  8  8  8  8 24  8  4 1  0x00   win,pb,pix  
0x05 16  0 y  .  5  6  5  0  0  0  0 0  0x00   pb,pix      
0x06 16  0 y  .  5  6  5  0 24  0  0 0  0x00   pb,pix      
0x07 16  0 y  .  5  6  5  0 24  8  0 0  0x00   pb,pix      
0x08 16  0 y  .  5  6  5  0 24  8  4 1  0x00   pb,pix      
0x09 24  0 y  .  8  8  8  0  0  0  0 0  0x00   win,pb,pix  
0x0a 24  0 y  .  8  8  8  0 24  8  0 0  0x00   win,pb,pix  
0x0b 24  0 y  .  8  8  8  0 24  8  4 1  0x00   win,pb,pix  
0x0c 16  0 y  .  5  5  5  1 24  8  0 0  0x00   pb,pix      
0x0d 16  0 y  .  5  5  5  1 24  8  4 1  0x00   pb,pix      
0x0e 16  0 y  .  4  4  4  4 24  8  0 0  0x00   pb,pix      
0x0f 16  0 y  .  4  4  4  4 24  8  4 1  0x00   pb,pix      
0x11 32  0 y  .  8  8  8  8 24  8  8 1  0x00   win,pb,pix  
0x12 16  0 y  .  5  6  5  0 24  8  8 1  0x00   pb,pix      
0x13 24  0 y  .  8  8  8  0 24  8  8 1  0x00   win,pb,pix  

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Sun Sep 20, 2015 8:34 am

crashoverride wrote:Speaking of ugly hacks, I do not think the way this patch is implemented is a good idea at all
https://github.com/ARM-software/linux/c ... f61b79c401

I checked the 4.2 kernel source code and the relevant changes to fb.h and fbmem.c are not present. They should be staging that in the exynos fbdev driver until upstream decides its ok to make it a global change for all architectures and devices. As it stands now, this is just another reason to prevent the changes from being mainlined.
actually, that patch is not the whole story.
after applying the patch myself, I had to remove struct fb_dmabuf_export because compilation failed: https://github.com/mihailescu2m/linux/c ... db0e65b9e1

User avatar
AreaScout
Posts: 730
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by AreaScout » Sun Sep 20, 2015 10:48 pm

memeka wrote:

Code: Select all

EGL API version: 1.4
EGL vendor string: ARM
EGL version string: 1.4 Midgard-"r6p0-02rel0"
EGL client APIs: OpenGL_ES
EGL extensions string:
     EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_create_context_robustness EGL_KHR_cl_event2
Configurations:
     bf lv d st colorbuffer dp st  ms    vis   supported
  id sz  l b ro  r  g  b  a th cl ns b    id   surfaces 
--------------------------------------------------------
0x01 32  0 y  .  8  8  8  8  0  0  0 0  0x00   win,pb,pix  
0x02 32  0 y  .  8  8  8  8 24  0  0 0  0x00   win,pb,pix  
0x03 32  0 y  .  8  8  8  8 24  8  0 0  0x00   win,pb,pix  
0x04 32  0 y  .  8  8  8  8 24  8  4 1  0x00   win,pb,pix  
0x05 16  0 y  .  5  6  5  0  0  0  0 0  0x00   pb,pix      
0x06 16  0 y  .  5  6  5  0 24  0  0 0  0x00   pb,pix      
0x07 16  0 y  .  5  6  5  0 24  8  0 0  0x00   pb,pix      
0x08 16  0 y  .  5  6  5  0 24  8  4 1  0x00   pb,pix      
0x09 24  0 y  .  8  8  8  0  0  0  0 0  0x00   win,pb,pix  
0x0a 24  0 y  .  8  8  8  0 24  8  0 0  0x00   win,pb,pix  
0x0b 24  0 y  .  8  8  8  0 24  8  4 1  0x00   win,pb,pix  
0x0c 16  0 y  .  5  5  5  1 24  8  0 0  0x00   pb,pix      
0x0d 16  0 y  .  5  5  5  1 24  8  4 1  0x00   pb,pix      
0x0e 16  0 y  .  4  4  4  4 24  8  0 0  0x00   pb,pix      
0x0f 16  0 y  .  4  4  4  4 24  8  4 1  0x00   pb,pix      
0x11 32  0 y  .  8  8  8  8 24  8  8 1  0x00   win,pb,pix  
0x12 16  0 y  .  5  6  5  0 24  8  8 1  0x00   pb,pix      
0x13 24  0 y  .  8  8  8  0 24  8  8 1  0x00   win,pb,pix  

thx memeka, i was interested if the driver supports now EGL_EXT_image_dma_buf_import, but it's not

User avatar
AreaScout
Posts: 730
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by AreaScout » Mon Sep 21, 2015 12:40 am

I have build Yocto/Poky minimal image with some additional packages, i did a RetroArch build and the GUI renders with 528fps ! nice ! :)

RG

stmicro
Posts: 237
Joined: Tue Apr 28, 2015 4:23 pm
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.
Location: shenzhen china
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by stmicro » Mon Sep 21, 2015 10:37 am

AreaScout wrote:I have build Yocto/Poky minimal image with some additional packages, i did a RetroArch build and the GUI renders with 528fps ! nice ! :)

RG
Great news! :o
Can you try the Dolphin emulator on the fbdev with this mali driver?
Has the Dolphin any dependency to the X11?

User avatar
rooted
Posts: 6278
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by rooted » Mon Sep 21, 2015 10:44 am

But does it improve emulators fps?

User avatar
meveric
Posts: 9690
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by meveric » Mon Sep 21, 2015 2:01 pm

@stmicro
Dolphin dropped ARM 32bit support. Only 64bit ARM processors are supported anymore.
You could only check with older builds (from over a year ago).
And i'm not sure about X11.. the old version we used was build on X11.. not sure if you can force it to work without. But i guess it could work.

@rooted
it shouldn't... GPU was never an issue with emulators. Most emulators are only limited by CPU speed.
Emulators like Atari Jaguar, do not have impressive 3D graphics, still they are slow as hell, but that's not due to missing GPU power ;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
rooted
Posts: 6278
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by rooted » Mon Sep 21, 2015 2:19 pm

Oh, I actually haven't tried any emulators on my odroids. I have been meaning to, I guess I need to pair a PS3 controller to my XU3 or 4 and get to playing.

User avatar
AreaScout
Posts: 730
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by AreaScout » Mon Sep 21, 2015 6:22 pm

well, compared to the old this is a ferrari, i have tested to apply shaders to retroarch and it works even with 4 x scale !



in the video you can't see the effect very well, the resolution of the camera is not so good, but trust me it is mind blowing :)


Image

Image

edit: added some pictures

RG
Last edited by AreaScout on Mon Sep 21, 2015 7:58 pm, edited 4 times in total.

stmicro
Posts: 237
Joined: Tue Apr 28, 2015 4:23 pm
languages_spoken: english, chinese
ODROIDs: Many Odroids and Rpis.
Location: shenzhen china
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by stmicro » Mon Sep 21, 2015 6:36 pm

Very clean and sharp 4x scaling shader.
Awesome mali driver for developing a decent full-HD arcade console.

Btw did you observe any tearing issue when you enabled the vsync?

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Mon Sep 21, 2015 7:50 pm

no tearing with vsync.

Kivutar
Posts: 18
Joined: Thu Feb 05, 2015 9:54 am
languages_spoken: english, french
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by Kivutar » Tue Sep 22, 2015 1:59 am

Here is an image of Lakka, with the new blobs and the branch of memeka.

http://sources.lakka.tv/nightly/OdroidX ... b34.img.gz

The power of the xu3/4 is finally unlocked. Great performance, good vsync and no tearing.

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Tue Sep 22, 2015 7:48 pm

I thought I'd try this on arch.
In the Arch PKGBUILD for the kernel a *.tar.gz archive of a specific commit from the HK github is downloaded.

All I've done is changed the Github URL to memka's patched repo and the commit to 94d8551d94005b2ce7ec5b838202e6db0e65b9e1 . The most recent.

It builds fine but when I start the board uboot hangs at Starting kernel ...

I have used this method to build custom kernels before and never had any problems.
At the start of the build I was asked two new questions

Code: Select all

Exynos DRM experimental Vsync (DRM_EXYNOS_EXPERIMENTAL_VSYNC) [N/y/?] (NEW) 
Chose y

Code: Select all

Mali Midgard series support (MALI_MIDGARD) [Y/n/m/?] y
  Streamline support
  > 1. Streamline support disabled (MALI_TIMELINE_DISABLED) (NEW)
    2. Streamline support via Gator (MALI_GATOR_SUPPORT)
    3. Streamline support via MIPE (MALI_MIPE_ENABLED) (NEW)
  choice[1-3?]: 1
Chose 1.

Anyone any ideas ? I'm at a bit of a loss as to why it's not loading at all ? I may try using an older version of gcc later just in case (On Arch I've had chromium segfault with 5.2.0 and Retroarch and one of the libretto cores fail to compile with 5.2.0). That's about all in can think off ?

No biggie as I guess it will be in the main kernel soon.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Tue Sep 22, 2015 9:02 pm

you need to select 2 - GATOR
or better, try this config: http://paste.ubuntu.com/12520687/

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Tue Sep 22, 2015 10:15 pm

Thanks. I'll have another try later

Kivutar
Posts: 18
Joined: Thu Feb 05, 2015 9:54 am
languages_spoken: english, french
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by Kivutar » Wed Sep 23, 2015 8:13 pm

@memeka, how much fps do you get on RetroArch when running a core? I get only 55 instead of 60. (In the XMB menu, I do get 60)

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Wed Sep 23, 2015 8:19 pm

it was 60 fps in pcsx with vsync on (in tekken 3)

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Wed Sep 23, 2015 9:22 pm

Well just for the record I tried to compile and install the kernel twice more with gcc 5.2.0. Once with the Arch config and MALI_GATOR_SUPPORT, and once with the config you suggested memeka. Same result. Hung at Starting kernel ...

I used gcc 5.1.0 and it worked first time.
I will put Arch packages for the kernel and Mali r6p0 on my package thread http://forum.odroid.com/viewtopic.php?f ... 50#p107370

I have only built the x11 r6p0 package at the moment. How are you guys managing having the fbdev drivers coexisting with the x11 drivers ? Or are you just uninstalling the x11 drivers when you use the fbdev drivers and vice versa ? The way the Arch Mali package from Alarm is setup (which I modified for r6p0) it's one or the other.

But I was wondering if I should set the fbdev mali package to install to a separate dir and then use LD_LIBRARY_PATH to point at the fbdev drivers with any fbdev packages I make ?
I'd like to be able to use both x11 and fbdev without keep switching packages.

Edit: I have built the fbdev package as well now but until I make my mind up it's one or the other.

Kivutar
Posts: 18
Joined: Thu Feb 05, 2015 9:54 am
languages_spoken: english, french
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by Kivutar » Thu Sep 24, 2015 5:18 am

memeka wrote:it was 60 fps in pcsx with vsync on (in tekken 3)
Ok, then I will try your kernel config. Thanks for the information.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Thu Sep 24, 2015 6:31 am

according to arm, only fbdev is supported - see first post.

Kivutar
Posts: 18
Joined: Thu Feb 05, 2015 9:54 am
languages_spoken: english, french
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by Kivutar » Thu Sep 24, 2015 7:52 am

Yes, i'm using fbdev. Even with your kernel config, I still get 55fps instead of 60fps.
I do get 60fps in the menu. But as soon as I launch a game, and wait 2048 frames, the fps falls at 55.

It's not easy to notice this 5fps difference without enabling the FPS display in RetroArch settings. Even myself, the first time I tried some games with the new driver, thought they were running at 60. I noticed it the second time, by enabling the FPS display. And then it became obvious that the music in the games were slower.

Could you please double check with this FPS display enabled? The option is in video settings.

I'm using your branch and your kernel config (except minor changes required by OpenELEC about filesystems). Justin Lee also noticed those 55fps (using my image).

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Thu Sep 24, 2015 12:40 pm

memeka wrote:according to arm, only fbdev is supported - see first post.
I may be blind but I don't see where it says only fbdev is supported ?
There is a x11 version of the r6p0 blob and it works. The big improvements may well be on the fbdev side but that doesn't affect my desire to have both side by side.

User avatar
memeka
Posts: 4144
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by memeka » Thu Sep 24, 2015 12:48 pm

yeah looks like it's been updated.

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Thu Sep 24, 2015 1:43 pm

memeka wrote:yeah looks like it's been updated.
I see what you mean now. The first link takes you to a page which does indeed say
only fbdev/directfb mode, no X11, no Wayland
I saw that but then saw there were x11 drivers so just tried them.

To be honest I'm not sure what "meta-mali" and "Yocto/Poky" is all about or how it relates to people just running standard linux distros on their odroids.
I did start reading https://www.yoctoproject.org/about but my eyes glazed over :)
https://en.wikipedia.org/wiki/Yocto_Project is a bit more helpful

User avatar
rooted
Posts: 6278
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by rooted » Thu Sep 24, 2015 4:22 pm

LOL, Yocto is the new buildroot. Or is orange the new black...I forget.

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Fri Sep 25, 2015 12:31 am

gripped wrote:To be honest I'm not sure what "meta-mali" and "Yocto/Poky" is all about or how it relates to people just running standard linux distros on their odroids.
The simplest explanation is that Yocto lets you make your own linux distribution. It replaces Ubuntu, Fedora, CentOS, SuSE, etc with a distribution you build and maintain. Meta-mali provides the "recipe" for adding ARM Mali support to Yocto.

Linux distributions are like sausage. While many enjoy the sausage, its a lot less enjoyable to many if they watch it being made. The same is true of linux distributions. Most people would rather just use one than make one (or watch one being made).
http://www.usingenglish.com/reference/i ... +made.html

Yocto lets you make your own sausage. You decide what goes into it and the "recipe" for making it. Years ago this was the only way to get linux running on an ARM board. These days, however, many distributions provide an ARM build eliminating the need for Yocto.

Some people still prefer to make their own sausage. Yocto enables this by providing a "sausage factory in a box". You download Yocto and the "recipe" for the hardware you wish to target and build the entire system: source code goes in one end and sausage comes out the other.

gripped
Posts: 691
Joined: Tue May 21, 2013 11:34 pm
languages_spoken: english
ODROIDs: U2 XU U3 XU3
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by gripped » Fri Sep 25, 2015 1:17 am

Thanks for the explanation.

I was right then in suspecting it has little relevance to me.
And unsurprisingly your analogy has left me felling hungry :)

dfawt
Posts: 22
Joined: Sat May 30, 2015 12:12 am
languages_spoken: english, spanish
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by dfawt » Sat Sep 26, 2015 12:13 am

Please, can someone tell me how to create a debian image with the mainline kernel and the best video driver I can have? So I can finally use my XU3 lite as a desktop PC.
I'm used to build the mainline kernel but i don't understand any of the video drivers! X11 or wayland, how to get userspace drivers... etc...

Thanks!!

crashoverride
Posts: 4230
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by crashoverride » Sat Sep 26, 2015 6:27 am

dfawt wrote:Please, can someone tell me how to create a debian image with the mainline kernel and the best video driver I can have?
You should probably open a new issue for that. This thread is about testing of new drivers and kernel patches. Currently, there is nothing officially released to integrate into any distributions.
dfawt wrote:I'm used to build the mainline kernel but i don't understand any of the video drivers! X11 or wayland, how to get userspace drivers... etc...
Once the kernel patches are integrated in to the official kernel, it will be posted here:
https://github.com/hardkernel/linux/tre ... xu3-3.10.y

Once the userland is tested and released, it will be posted here:
https://github.com/mdrjr/5422_mali

Again, there is nothing officially released to integrate into any distribution. The discussion here is about testing.

dfawt
Posts: 22
Joined: Sat May 30, 2015 12:12 am
languages_spoken: english, spanish
Contact:

Re: XU3/4 Mali GPU driver for FBDEV with DMA-BUF & VSYNC by

Unread post by dfawt » Mon Sep 28, 2015 11:09 pm

crashoverride wrote:
dfawt wrote:Please, can someone tell me how to create a debian image with the mainline kernel and the best video driver I can have?
You should probably open a new issue for that. This thread is about testing of new drivers and kernel patches. Currently, there is nothing officially released to integrate into any distributions.
dfawt wrote:I'm used to build the mainline kernel but i don't understand any of the video drivers! X11 or wayland, how to get userspace drivers... etc...
Once the kernel patches are integrated in to the official kernel, it will be posted here:
https://github.com/hardkernel/linux/tre ... xu3-3.10.y

Once the userland is tested and released, it will be posted here:
https://github.com/mdrjr/5422_mali

Again, there is nothing officially released to integrate into any distribution. The discussion here is about testing.

Thanks for your answer!

Sorry for asking again, but then I must not use the mainline kernel? I think so because there are device tree files related to the XU3 board. What I want to do is testing this new video drivers but I don't understand how :(

Post Reply

Return to “News”

Who is online

Users browsing this forum: No registered users and 1 guest