diff options
author | Simon Ser <contact@emersion.fr> | 2023-10-16 13:10:11 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-11-28 13:18:39 +0000 |
commit | ae3d7a697c3e8b137f6cf5f9208cc9dd132f541c (patch) | |
tree | b09b36f50aec37c337cd8c60fef471334f28eadb /backend | |
parent | 395a08f5d19151b6a1a6e788c9f112a00953ec37 (diff) |
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.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/renderer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index dbaa55b7..29903f19 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -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); |