OpenGL on i.MX6 : bad performance

Carlos Rafael Giani dv at pseudoterminal.org
Sat Oct 25 09:40:27 PDT 2014


Zerocopy is absolutely essential here to ensure low CPU usage. 
Especially with 1920x1080 pixels. There is currently no way to use EGL 
image for this purpose, though. (Hopefully the etnaviv project will 
eventually fix that.)

Right now, the only way to work with GL in a zerocopy manner on the 
imx6, Vivante's direct texture extensions must be used. With these, the 
GPU reads the pixels over DMA from a physically contiguous buffer.

As for V4L2, it does require hacks to get physical addresses for a 
physically contiguous buffer that stores the frames captured by the 
camera. But this does not work for UVC-based webcams, only for cameras 
that are connected over the CPI/CSI interfaces (like the ov5640 and 
ov5642 chips).



On 2014-10-25 14:54, Nicolas Dufresne wrote:
>
> Le 2014-10-07 09:23, Jean-Michel Hautbois a écrit :
>> These are static images, but in a real case, it could be a webcam, or
>> something else like a decoded video, how could these elements be more
>> efficient ? Maybe is it a pipeline problem, I may have forgotten some
>> things ?
> Personally I do have the impression most of the cost is en-globed in 
> GL upload. In high water mark, we see kernel side work (probably copy 
> there), memory flushing (common when acquiring contiguous memory). The 
> GL stack in upload could also be doing SW color conversion, I do have 
> seen that in the past.
>
> If your use case is capture from imx camera with vendor kernel, I 
> would recommend that you learn how their custom contiguous memory 
> stuff work. This if large hacks in the V4L2 driver. Then find a way to 
> turn this memory into EGL image, wrapping it with libgstgl. This 
> should let you skip the upload phase (does not guaranty there will be 
> no GPU copy, but still already better). I have no idea if Freescale 
> has proper GL extension for this though.
>
> If you are looking for more test, you should try with gltestsrc, at 
> least in this test there won't be any upload as gltestsrc will 
> generate textures.
>
> regards,
> Nicolas
>
>
> ps. Vendor specific set of elements: 
> https://github.com/Freescale/gstreamer-imx
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list