1
0
Fork 0

backend/native: Use drmModeCloseFB for flicker-free login

When logging in from gdm to gnome, the main plane is deactivated, and
leads to the screen going blank before gnome is able to enable it
again.
Using the new CloseFB ioctl, allows to keep the gdm login screen
displayed until gnome-shell replace it.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3659>
This commit is contained in:
Jocelyn Falempe 2024-03-13 15:34:14 +01:00 committed by Marge Bot
parent a50bc0ff7d
commit a775241efd
2 changed files with 4 additions and 2 deletions

View file

@ -51,7 +51,7 @@ wayland_protocols_req = '>= 1.33'
# native backend version requirements
libinput_req = '>= 1.19.0'
gbm_req = '>= 21.3'
libdrm_req = '>= 2.4.95'
libdrm_req = '>= 2.4.118'
# screen cast version requirements
libpipewire_req = '>= 0.3.33'

View file

@ -167,7 +167,9 @@ meta_drm_buffer_release_fb_id (MetaDrmBuffer *buffer)
int ret;
fd = meta_device_file_get_fd (priv->device_file);
ret = drmModeRmFB (fd, priv->fb_id);
ret = drmModeCloseFB (fd, priv->fb_id);
if (ret == -EINVAL)
ret = drmModeRmFB (fd, priv->fb_id);
if (ret != 0)
g_warning ("drmModeRmFB: %s", g_strerror (-ret));