Hi everybody.
I've been working on an application that should run on i.MX8 platforms using the Vivante extensions and Qt.
This application works properly on i.MX6 platforms using frame-buffer distros, which are not available for i.MX8 platforms, according to the NXP Yocto documentation:
MX8 Framebuffer and X11 distros are not supported. Only use these for MX6 and MX7 SoC.
However, the Vivante routines I'm using don't do anything and don't throw any errors.
Environment:
Here is the information about the environment I'm using:
The glTexDirectVIVMap routine:
The glTexDirectVIVMap is the most important routine I need to use.
According to the official NXP iMX Graphics User Guide, here is the information about that routine:
In my application, if I replace the glTexDirectVIVMap routine line by the glTexImage2D function, the application works properly. However, we need hardware acceleration to reduce the CPU load and to improve the frame rates.
I also tried printing the glGetError() output after each Vivante routine execution, but the output is always zero (no GL errors).
The Gst-plugins-imx V2 Package:
I am also using the gstreamer1.0-plugins-imx V2 package as a dependency of my application, since the V1 version are not available for i.MX8 platforms. I used V1 on i.MX6 and it has been working fine.
Information about the updates on V2 is present in the package's Changelog.
As you can see in the previous image, the glTexDirectVIVMap routine requires a pointer to a physical address. I used the information present in the aforementioned Changelog to update the way I was obtaining that physical address, according to the following information:
DMA memory allocation is now done via the GstImxDmaBufferAllocator GObject interface is present in the gstimxcommon library. Implementations of this interface use libimxdmabuffer. These allocators also implement the GstPhysMemoryAllocator interface to allow for easier interfacing with other GStreamer code that uses physical addresses. In addition, one of the allocator classes is based on the ION allocator and is based on
the GstDmaBufAllocator class. This is the preferred allocator in the gstimxcommon library. If ION is available, this one is used, automatically providing GstMemory blocks that are compatible with the gst_dmabuf_memory and gst_phys_memory APIs. This completely replaces GstImxPhysMemMeta, GstImxPhysMemory, GstImxPhysMemAllocator, and GstImxPhysMemBufferPool from v1.
In order to discard if the way I was using the physical memory with this V2 changes was wrong, I also tried by using the glTexDirectVIV routine, which doesn't require the physical memory pointer. However, the glTexDirectVIV routine didn't work either.
Related Threads:
I found some threads in the NXP forums where some users reported a malfunctioning of the glTexDirectVIVMap routine and issues with other GL-Vivante functions as well on kernel version 5 for i.MX8 platforms:
Some users also reported they had applications working properly on kernel version 4 using the GL-Vivante routines, but I need to have Vivante on kernel version 5 as well.
We have spent too much time trying to get Vivante working properly on i.MX8 platforms.
I would appreciate any help or suggestions on this use case.
Thanks in advance.
-JC
Hi
Can you try L5.10.52? I see that the glTexDirectVIVMap issue has been fixed recently
Hi @Zhiming_Liu
Thanks for your suggestion.
I apologize for the late response.
I had the testing process on hold due to other projects.
I built a Yocto Harknott image using kernel L5.10.52 version.
However, I still got the same malfunctioning of the Vivante extensions reported in my previous post: glTexDirectVIVMap and glTexDirectInvalidateVIV.
On the other hand, I've seen there is a new kernel update available for Yocto Harknott on i.MX8 [L5.10.72]:
My questions:
1. Is there any basic application I could use as a reference to run the Vivante extensions on i.MX8 platforms?
2. Is it possible that Vivante extensions work properly with the newest kernel update?
Thank you in advance.
-JC
Hi @juancruz
Can you share me your test demo? I need do test in my side.