I get this strength issues from ODROID
drivers for Mali-400 don't support
eglCreateImageKHR with EGL_LINUX_DMA_BUF_EXT
?
but drivers internaly use DMA_BUF
any reason or workaround for this for this?
And why UMP is supported and DMA_BUF isn't?
But eglCreateImageKHR with EGL_LINUX_DMA_BUF_EXT
is not supported in mali400 drivers only mali600+ drivers support it
mali 400 support eglCreateImageKHR with UMP
but latest drivers internally use DMA_BUF.
This is how I understand Peter response
Thanks for the clarification m][sko.
I can confirm that the extension that allows EGL_LINUX_DMA_BUF_EXT, which is EGL_EXT_image_dma_buf_import, is not currently supported on Utgard devices, only Midgard devices.
I will look into whether there are plans for this, however in the mean time, could you look into Pete's suggestion of wrapping a dma_buf into a UMP handle, and use that instead?
If I hear any further news, I will let you know.
Kind Regards,
Michael McGeagh
I don't think Pete's suggestion can be used to achieve the equivalent of EGL_LINUX_DMA_BUF_EXT.
Sure, we could invent some API that lets us create a dma-buf from a UMP handle.
But then how can we pass that "fake" dma-buf into the Mali-400 libEGL/libGLESv2 implementation if it does not support the EXT_image_dma_buf_import API at all?
I think Pete was suggesting the opposite, creating a ump handle for a dma_buf and passing that to GLES as it supports UMP images. Not sure if this is possible everywhere but its a potential workaround.
Hth,
Chris
Oh, OK. Still, similar dilemma.
Lets say I have image data in a dma-buf. I write an interface to give me a UMP handle for that dma-buf. OK so far.
Now I have an appropriate UMP handle in my application. How can I get a GL texture that refers to that UMP memory? What is the API for that?
So the answer to that question depends on whether you're using FBDEV or X11... My understanding (potentially wrong!) for FBDEV...
eglCreateImageKHR(dpy, ctx, EGL_NATIVE_PIXMAP_KHR, (EGLClientBuffer)ump_handle, attrib_list);
We basically hijack the EGL_NATIVE_PIXMAP_KHR type because FBDEV doesn't have anything defined for that, and you just pass the ump handle For X11 I'll have to reply once I understand it.
m][sko and I are using the X11 version so we'll be very interested in the results of your investigation.
Very promising to see that there is a way to do it with the fbdev version at least. Thanks for sharing!
Hi dsd,
Discussions are ongoing internally, I've been pointed to some test code which exercises this path and I've raised that with the appropriate team to hopefully feed you back some simple instructions.
Thanks,
Hi Chris,
Did any code come out of the internal discussion?
I'm still using the UMP version here, but I'm also curious to know if such "UMP import" functionality will work on the r4p0 blob compiled to use dmabufs internally (e.g. VARIANT=mali400-r1p1-gles11-gles20-linux-monolithic-no_profiling-x11-dma_buf)
We have an engineer working on verifying the proposed solution as we speak
For dma-buf blobs, based on conversations I've had internally, it would seem the exact same mechanism we are currently verifying can be used (in absence of the proper extension), just replacing a ump handle with a dma-buf one.
Just to update, we hit a bit of a brick wall with UMP as we couldn't find an odroid BSP on their site that would run a simple spinning cube test application, can you let us know what you're using?
We moved on to the more recent dma-buf versions to see if the same mechanism would work there... We have a test module which allocates and exports a dma-buf for us, yay, but best I can tell without DRI3 it's impossible to create an XPixmap from that buffer, unless someone out there could help us out with a method in absence of DRI3?
Hi Chris, sorry for the slow response. For some reason I don't get emails for my notifications on this site even though my preferences page suggests that I should.
I will get you a relevant ODROID UMP setup as soon as I can. Can you tell me what hardware version of the ODROID you are working with?
For your dma-buf efforts.. can you clarify why you need an X Pixmap here? For pixmaps there is already the texture-from-pixmap extension. In this case the requirement is to create a texture that points at the image data in a dma-buf that is *not* an X pixmap (e.g. it came from the hardware's video decoding unit).
Another engineer is working on this so I will let them give details of the platform, although i expect it is a U2. From what I have been told (and what we are trying to test) in an x11-dmabuf mali system the eglCreateImageKhr call is expecting an XPixmap to be passed which internally contains the dma-buf handle (potentially coming from other hardware units as you describe), and the driver will grab the handle from that pixmap. However, we can't work out how to create a pixmap from a dma-buf handle without DRI3 to test it. Does this make sense?
I see. Did some more research about that.
Indeed the whole point of DRI3 is that you can now create an X pixmap from a dmabuf file descriptor, and in that sense, perhaps eglCreateImageKHR(EGL_NATIVE_PIXMAP_KHR) could be used to create a GL texture that corresponds to that dmabuf. It would be really cool if Mali-400 supported DRI3 and maybe one day I'll create a thread about that...
But back to the present day and the present request. This request is about EGL_LINUX_DMA_BUF_EXT, which has already become common in the wild and is even implemented (AFAIK) on Mali-6xx.
You can read the full description of this API here: https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
As you can see, with this API you can just pass the raw file descriptor in the attribute list. No need to deal with pixmaps. That documentation does not even mention the word "pixmap".
By the way, we recently extended our team here with a DRI expert, so feel free to continue prodding if there are ways we can help you make progress.
I will work on making you a relevant ODROID-U2 image so that we can continue exploring the UMP side of this.
Understood on the dmabuf import extension, obviously this is the preferable mechanism on systems that expose it! The mali400 driver has this on trunk and will be in a future release. The xpixmap mechanism is a potential alternative for systems which do not currently have the dmabuf import mechanism, which is why we were looking at it to hopefully provide dma-buf support in the mean time. Sorry for any confusion I might have caused there. I believe UMP is now the focus at our end
Oh, that is excellent news. Thanks for sharing that.
And indeed, I can believe that there is no obvious way to feed a dmabuf into the current released version. Creating a X pixmap that corresponds to a dmabuf is something that really requires DRI3, as that really was the sole purpose for which DRI3 was developed.
Still interested in the UMP approach so I'll get an odroid-u2 test image to you hopefully next week.