backend/drm: use DRM_IOCTL_MODE_CLOSEFB instead of RMFB

RMFB implicitly performs a modeset to turn off any CRTC which is
using the FB. This prevents seamless transitions between two DRM
masters from working.

Use the new CLOSEFB IOCTL which doesn't turn off anything and leave
it up to the compositor to turn off outputs on shutdown if it wants
to.
master
Simon Ser 1 year ago
parent 395a08f5d1
commit ae3d7a697c

@ -394,8 +394,12 @@ void drm_fb_destroy(struct wlr_drm_fb *fb) {
wl_list_remove(&fb->link);
wlr_addon_finish(&fb->addon);
if (drmModeRmFB(drm->fd, fb->id) != 0) {
wlr_log(WLR_ERROR, "drmModeRmFB failed");
int ret = drmModeCloseFB(drm->fd, fb->id);
if (ret == -EINVAL) {
ret = drmModeRmFB(drm->fd, fb->id);
}
if (ret != 0) {
wlr_log(WLR_ERROR, "Failed to close FB: %s", strerror(-ret));
}
free(fb);

@ -109,7 +109,7 @@ wayland_server = dependency('wayland-server',
)
drm = dependency('libdrm',
version: '>=2.4.114',
version: '>=2.4.118',
fallback: 'libdrm',
default_options: [
'intel=disabled',

Loading…
Cancel
Save