EGLStreams with DRM KMS on the TX1

We are interested in using EGLStreams together with DRM KMS to do X11-less rendering on the TX1 as demonstrated in the eglstreams-kms-example sample provided by NVIDIA:

But it looks like Linux For Tegra R24.1 does not support this feature for at least two reasons:

  • The kernel is too old and does not have support for DRM atomic KMS
  • The NVIDIA graphics driver stack does not include the nvidia-drm kernel module required for NVIDIA’s DRM KMS support

Can anyone confirm? If not currently supported, are there plans to support this feature in the future?

I can’t answer your question, but there is an observation which may be at least somewhat useful. It looks like the software in question can be run without X11 because it uses Wayland instead. I see Wayland libraries installed, but those are support which still need a compositor…it may be that you need to install something like Weston or its virtual compositor counterpart.

linuxdev,

Maybe I missed something, but I see nothing related to Wayland in the eglstreams-kms-example code sample. Can you pinpoint where Wayland is used?

From the URL here:
https://github.com/aritger/eglstreams-kms-example
…I see this on the line just above the list of files:
“aritger Add draft EGL_WL_wayland_eglstream extension specification”

If you go into the subdirectory of that URL you’ll see what seems to be example code for the proposed addtion:
https://github.com/aritger/eglstreams-kms-example/tree/master/proposed-extensions

I have no knowledge beyond what I’ve seen on the git URL.

More information on your use case might provide more ideas. One question I always wonder is if people really need to get rid of X11, or if it is just the window manager environment they want to get rid of. By itself X11 just provides the ability to display graphics for a single program, and does not provide any ability to open windows in a desktop style envoironment. It is possible to run X11 with just a single custom application and no access to things like multiple windows or multiple programs running concurrently (that is entirely the window manager’s job, X11 knows nothing about that). On the other hand, if you have software requiring the newer kernel, I don’t know of a solution.

I understand now what you are referring to: you are talking about EGL_WL_wayland_eglstream, an EGL extension for Wayland. If you inspect the code sample itself (consisting of the files in the root directory: egl.c, egl.h…), you will see that Wayland is not used.

We are looking for a solution to display full screen content rendered with OpenGL. We could simply use X11 without the window manager environment, just as you said, but we would like to also explore alternative solutions such as EGLStreams.

The problem is that the video driver must be tied into something else which understands its ABI to own the actual rendering context. Anything you build would be a substitute for software such as X or Wayland…more or less re-inventing the wheel. X, when not using any window manager, and when not configured for remote display, is actually not too intrusive.

There was this announcement which talks about EGLstreams, but the primary focus of the announcement was centered on Vulkan:
https://devtalk.nvidia.com/default/topic/925605/linux/nvidia-364-12-release-vulkan-glvnd-drm-kms-and-eglstreams/

Basically it sounds like you’d want to do the equivalent of Vulkan (which would be a substitute for X, and has an implementation useful with the existing Jetson nVidia video driver for hardware acceleration)…this might be the route to go for your use case. I believe the newer L4T releases support Vulkan, and there is likely a method to run this without X, though I couldn’t guarantee that. The steps for setting up just Vulkan instead of X will probably be more trial-and-error since X is already the default and merely requires configuration to not use a window manager or login manager. If I were to personally do this I’d first get it to work with X going directly to your application without window manager or login manager; once that worked, I’d then try replacing X with Vulkan (I’ve never worked on Vulkan, this would be new territory). Half of this is setting up Linux init (simplifying until X runs directly with your app does this), the other half is setting up graphics (substituting Vulkan for X does this). Should you be unable to get Vulkan as the X substitute you want, then you’d still have pure-X as the fallback.

We enable DRM-KMS in tegra now. If you want to use X11-less rendering method. Please take a look at our MMAPI samples -08_video_dec_drm.