Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QT app alongside separate gstreamer app = gckKERNEL_MapVideoMemoryEx / gckKERNEL_LockVideoMemory / gckVGKERNEL_Dispatch error #148

Closed
JamesCC opened this issue Mar 29, 2017 · 4 comments

Comments

@JamesCC
Copy link

JamesCC commented Mar 29, 2017

We are using the imx6 IPU facilites for overlaying framebuffers. QT application (using GLES) on /dev/fb1, which overlays the output of a separate gstreamer application rendering on /dev/fb0.

Our problem is that whilst running the QT application, and setting up and starting the gstreamer pipeline (in the other application), we seem to have some kind of race condition on Mapping some Video Memory in Vivante gpu (gc_hal) core...

[20055.716812] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ gckKERNEL_MapVideoMemoryEx(362)
[20055.725657] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ gckKERNEL_LockVideoMemory(1160)
[20055.725696] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ gckVGKERNEL_Dispatch(589)

I am drawing the conclusion of a race condition as sometimes it succeeds, but very often we see these errors, and the gstreamer application exceptions. The gstreamer pipeline is setup is okay, it is enabling the pipeline that results in the error messages, and exception.

I wondered if anyone had any advice/experience on these warning messages?

The issue is not seen if the QT application is not running, nor is it seen if the gstreamer pipeline is started before the QT application is started.

We're stuck on the 3.14.79 kernel (which I appreciate is a bit old), but I've tried gstreamer-imx 0.11.1, 0.12.1, and 0.12.3. We are using QT 5.7.1 on iMX6Q.

I appreciate there is not enough evidence to blame gstreamer-imx specifically - it might well be QT EGLFS, or the freescale libraries, and I will debug further.

@otavio
Copy link
Member

otavio commented Mar 29, 2017 via email

@JamesCC
Copy link
Author

JamesCC commented Mar 29, 2017

That's our fallback option. The gstreamer app does a lot more than just display video (it handles overlay of graphics using the compositor and records those overlaid images).

We want to separate them, as today they run on the same device, but in the future the gstreamer app will run remotely (on something without a display) and the QT app will receive the processed video via a network stream.

Interestingly today we discovered overlaying using an QT app with 3D graphics did not cause the problem, also wasn't seen with some of the simpler apps. It seems related to running QML / QT Quick?

@JamesCC
Copy link
Author

JamesCC commented Mar 31, 2017

It looks to be an issue within imx-gpu-viv (still chasing it). We are using 5.0.11.p4.5, I'm now testing a few later versions.

Closing as it is probably not a gstreamer-imx issue.

@JamesCC JamesCC closed this as completed Mar 31, 2017
@JamesCC
Copy link
Author

JamesCC commented Apr 6, 2017

This was a problem with imx-gpu-viv (the Vivante 2D and 3D GPU). Specifically the fault was seen when using the g2d transforms and sinks, and seemed to result in memory corruption. 5.0.11.p8.4/8.6 introduced changes to memory allocation, which seems to have solved this issue.

The problem was seen in imx-gpu-viv-5.0.11.p4.5 and also imx-gpu-viv-5.0.11.p7.4+fslc
And solved in version: imx-gpu-viv-5.0.11.p8.6+fslc

I used the kernel module found at... https://github.com/Freescale/kernel-module-imx-gpu-viv
commit a05d9b2 (which is 8.6 + a few patches, aninteresting one being 6a01dfb6 - a fix for a memory leak). This has the "+fslc" mark. Thanks to otavio for providing these.

See https://github.com/Freescale/meta-fsl-arm/tree/master/recipes-graphics/imx-gpu-viv
for a YOCTO recipe if you are in that gang - but remember you need 8.6 commit a05d9b2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants