Skip to content

Make NVIDIA + gbm use atomic mode setting

We denied using atomic mode setting with NVIDIA because we initialized the mode setting device before attempting to initialize the renderer. It wasn't until the renderer was initialized that we knew whether EGLStream or gbm would be used, so we had to always deny atomic mode setting with NVIDIA due to this, as EGLStream based page flipping is incompatible with atomic mode setting.

This MR shuffles things around by first creating the MetaRenderDevice (which can be either gbm or EGLSTream based), then if it was EGLStream based, force legacy mode setting when creating the mode setting device. Then when initializing the renderer, the already prepared render devices are taken from the backend, instead of created, as they were before.

This allows us to remove the nvidia-drm from the atomic mode setting deny list. The third commit is an unrelated bonus.

Cc: @ekurzinger

Edited by Jonas Ådahl

Merge request reports