Hi,
I am using Linux R35.5.0 (Jetpack 5.1.3) with a custom carrier board, GStreamer and QT 5.12.12 .
My QT app is configured to use the KMS/DRM backend (no windowing system) to render QT graphics using EGLStreams for buffer management. This works most of the time except for this:
- the UI render thread sometimes hangs in a call to EGL swapBuffers which gets stuck in pthread_cond_wait in GLIBC library.
- the EglStrmAcq thread sometimes has a segmentation fault as per
Libnvll crash
Above hang and seg fault only seems to happen after a call to gst_nvdrmvideosink_stop. This is a DVR app so one of the six video inputs gets routed to the display per user request hence there is a call to gst_nvdrmvideosink_stop every time the viewed video source is changed.
To get around these issues I am trying to use GBM instead of EGLStreams for my QT renderer. However gbm_create_device() is failing. QT code is doing this:
int fd = drmOpen(“drm-nvdc”, nullptr); //returns fd=5
m_gbm_device = gbm_create_device(fd); //returns 0
Seems correct per https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/WindowingSystems/WestonWayland.html:
This code snippet shows how to allocate a buffer using GBM:
drm_fd = open(“/dev/dri/card0”, O_RDWR);
device = gbm_create_device(drm_fd);
I cannot use open() since there is no “/dev/dri” device to get a fd. Is drmOpen
fd not compatible with gbm_create_device()?