"Zero-copy" video rendering with Mali

Moderators: mdrjr, odroid

Re: "Zero-copy" video rendering with Mali

Unread postby nvl1109 » Mon Oct 09, 2017 10:42 am

Hello all,
Thank you for your shares.
I'm checking the render performance of Odroid C2. I have tried CXVideoCube from crashoverride. But it is not success because of official Mali driver does not support EGL_EXT_image_dma_buf_import, error 0x300c (EGL_BAD_PARAMETER) at https://github.com/OtherCrashOverride/C ... n.cpp#L871.
Could you please share me the mali driver which supports DMA_BUF? Thank you.
nvl1109
 
Posts: 22
Joined: Fri Aug 11, 2017 3:41 pm
languages_spoken: english
ODROIDs: C2

Re: "Zero-copy" video rendering with Mali

Unread postby rafaelSorel » Wed Dec 06, 2017 6:59 pm

Thank you guys, you have really done a great job, I have been reading the topic for hours to see what was the final conclusion regarding the use of zero-copy Decoder->Renderer (I have also read the first topic on the C1).
I will join @nvl1109 and ask also for the the mali driver that you guys have used which supports DMA_BUF.
Otherwise there is no way to experiment the zero-copy code added by @crashoverride here https://github.com/OtherCrashOverride/CXVideoCube.
@crashoverride, @LongChair, @peakock: Could you please share with us the used mali driver that supports the DMA_BUF so we can experiement what has been done so far and may be go further ?
I can also see that @crashoverride has mentionned in his repo that CXVideoCube uses the mali-fbdev driver package, and the DMA_BUF modified driver was an X one. Did the modified mali drive was an X driver that has been tuned to work on fbdev environment ?

Thank you for your replies :)
rafaelSorel
 
Posts: 5
Joined: Wed Dec 06, 2017 8:44 am
languages_spoken: english
ODROIDs: Odroid C2

Re: "Zero-copy" video rendering with Mali

Unread postby crashoverride » Thu Dec 07, 2017 4:50 am

rafaelSorel wrote:Could you please share with us the used mali driver that supports the DMA_BUF

It will be up to HardKernel to provide the Mali driver. I do not know if DMA_BUF was added to the official Mali X11 driver or not. I also no longer have the driver used in testing so can not provide it.

rafaelSorel wrote:Did the modified mali drive was an X driver that has been tuned to work on fbdev environment ?

My understanding (that may be wrong) is that ARM provides drivers that can be built for fbdev, X11, and other environments like Wayland. A license is obtained by a provider (HardKernel) and the driver is configured and built for the environment. This implies all Mali drivers are all the same with only the platform support interface differing.
crashoverride
 
Posts: 3113
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: "Zero-copy" video rendering with Mali

Unread postby rafaelSorel » Thu Dec 07, 2017 6:23 am

@crashoverride: thanks for your quick reply, when we talk about mali driver we are talking actually about the user space lib (libMali), because the kernel driver is an open source provided on utgard part ?

When I run a strings on libMali X11 /r6p1/, I could see the DMA_BUF support :

Code: Select all
EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_x11
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error


But never on the fbdev one.

The libMali source code has never been provided but any platform maker, may be only for google chromium one (libEGL in this case).
@mdrjr: is it possible to have libMali FBdev with DMA_BUF activated, it is for experiment purpose, to test and go further on the zero-copy process on odroidC2 (mali 450 serie) ?

@crashoverride: Unless HK provide the wanted lib, there is no way to test CXVideoCube and generally the DMA_BUF ?

Thanks for your replies,
rafaelSorel
 
Posts: 5
Joined: Wed Dec 06, 2017 8:44 am
languages_spoken: english
ODROIDs: Odroid C2

Re: "Zero-copy" video rendering with Mali

Unread postby crashoverride » Thu Dec 07, 2017 9:48 am

rafaelSorel wrote:@crashoverride: Unless HK provide the wanted lib, there is no way to test CXVideoCube and generally the DMA_BUF ?

Its been a really long time, but I thought the situation was the opposite: there was DMA_BUF support for fbdev but not for X11. Regardless, the DMA_BUF support (EGL_EXT_image_dma_buf_import) is required for the program to work. HardKernel will need to clarify if DMA_BUF is supported and whether its supported for fbdev, X11, or both.
crashoverride
 
Posts: 3113
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: "Zero-copy" video rendering with Mali

Unread postby odroid » Thu Dec 07, 2017 11:59 am

Check the dma_buf feature on this image after doing "apt-get install mali-fbdev" command.
https://wiki.odroid.com/odroid-c2/os_im ... imal_image
User avatar
odroid
Site Admin
 
Posts: 25323
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: "Zero-copy" video rendering with Mali

Unread postby nvl1109 » Thu Dec 07, 2017 5:28 pm

Hello @odroid,
I just tried to use the minimal image from your link, mali-fbdev package installed.
But the DMA_BUF extension still not available.

Code: Select all
EGL: major=1, minor=4
EGL: Vendor=ARM
EGL: Version=1.4 Linux-r6p1-01rel0
EGL: ClientAPIs=OpenGL_ES
EGL: Extensions=EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error
EGL: ClientExtensions=EGL_EXT_client_extensions EGL_EXT_platform_base
nvl1109
 
Posts: 22
Joined: Fri Aug 11, 2017 3:41 pm
languages_spoken: english
ODROIDs: C2

Re: "Zero-copy" video rendering with Mali

Unread postby rafaelSorel » Thu Dec 07, 2017 10:40 pm

crashoverride wrote:Its been a really long time, but I thought the situation was the opposite: there was DMA_BUF support for fbdev but not for X11.

@crashoverride: I have gone through all the previous mali drivers starting from the r4p0 release I thing to r7p1 , and the DMA support has started on X11 lib from version r6p0 and never been provided for fbdev environement.

@odroid : I can confirm that the libMali used on the latest ubuntu server package does not support the DMA_BUF:
Code: Select all
EGL_EXT_client_extensions EGL_EXT_platform_base
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error


When I run strings on the lib, there is no DMA key word that pops up, this is I guess the compile command done to compile that partcular lib:
Code: Select all
BUILD=RELEASE ARCH=arch_011_udd PLATFORM=default_8a TRACE=0 THREAD= GEOM= CORES=MALI450 USING_MALI450=1 TARGET_CORE_REVISION=0x0000 TOPLEVEL_REPO_URL=e662576 REVISION=e662576 CHANGED_REVISION=e662576 REPO_URL=heads/r6p1 BUILD_DATE=Mon May 23 04:31:15 EDT 2016 CHANGE_DATE=2016-05-17 05:33:42 -0300 TARGET_TOOLCHAIN=gcc HOST_TOOLCHAIN=gcc TARGET_TOOLCHAIN_VERSION=gcc version 5.3.1 20160407 (Ubuntu/Linaro 5.3.1-13ubuntu6)  HOST_TOOLCHAIN_VERSION=gcc version 5.3.1 20160407 (Ubuntu/Linaro 5.3.1-13ubuntu6)  TARGET_SYSTEM=gcc-aarch64-linux HOST_SYSTEM=gcc-aarch64-linux CPPFLAGS= CUSTOMER=internal VARIANT=mali450-r0p0-gles-linux-vsync HOSTLIB=direct INSTRUMENTED=FALSE USING_MRI=FALSE MALI_TEST_API= UDD_OS=linux


In the other hand I have managed to find out another libMali-450-fbdev-64bit for a different SOC (Rockship) and when looking at the lib symbols I could see the DMA_BUF support:
Code: Select all
EGL_EXT_client_extensions EGL_EXT_platform_base
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error


So I guess it is perfectly possible to have a lib that supports DMA for fbdev, any way the driver (mali.ko) supports DMA in all cases.

@odroid: is it possible to have such a lib compiled with DMA support for Fbdev environement ?

[Edit]:
The DMA_BUF is only activated for X11 environement:
Code: Select all
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error
EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error
egl: BUILD=RELEASE ARCH=arch_011_udd PLATFORM=default_8a TRACE=0 THREAD= GEOM= CORES=MALI450 USING_MALI450=1 TARGET_CORE_REVISION=0x0000 TOPLEVEL_REPO_URL=1b3d596 REVISION=1b3d596 CHANGED_REVISION=1b3d596 REPO_URL=heads/aml-64bit BUILD_DATE=Tue Apr 19 17:29:53 CST 2016 CHANGE_DATE=2016-04-19 13:51:47 +0800 TARGET_TOOLCHAIN=aarch64-linux-gcc HOST_TOOLCHAIN=gcc TARGET_TOOLCHAIN_VERSION=gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09)  HOST_TOOLCHAIN_VERSION=gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2)  TARGET_SYSTEM=aarch64-linux-gcc HOST_SYSTEM=gcc-x86_64-linux CPPFLAGS= CUSTOMER=internal VARIANT=mali450-r0p0-gles11-gles20-linux-x11-dma_buf-vsync HOSTLIB=direct INSTRUMENTED=FALSE USING_MRI=FALSE MALI_TEST_API= UDD_OS=linux


So I guess the VARIANT for compiling the fbdev Mali lib would be
Code: Select all
VARIANT=mali450-r0p0-gles11-gles20-linux-fbdev-dma_buf-vsync
.
Thanks for your replies,
rafaelSorel
 
Posts: 5
Joined: Wed Dec 06, 2017 8:44 am
languages_spoken: english
ODROIDs: Odroid C2

Previous

Return to Ubuntu

Who is online

Users browsing this forum: hsu95066 and 3 guests