aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-27 09:07:57 +0200
committerSimon Ser <contact@emersion.fr>2021-04-27 09:11:44 +0200
commit4839664a9209e2829f3f90006065229b5c17007c (patch)
tree637e42b316e14bed69c60fd3870cd9aa67f4b9d7
parent9b0e0970f9c69636d54b320d98bd23b2814c735b (diff)
backend/drm: carry on when disabling a CRTC fails
On GPU unplug, disabling a CRTC can fail with EPERM. References: https://github.com/swaywm/wlroots/pull/2575#issuecomment-761771264
-rw-r--r--backend/drm/drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index f064c184..e2b4bb3e 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1053,7 +1053,9 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
conn->crtc->pending_modeset = true;
conn->crtc->pending.active = false;
if (!drm_crtc_commit(conn, 0)) {
- return;
+ // On GPU unplug, disabling the CRTC can fail with EPERM
+ wlr_drm_conn_log(conn, WLR_ERROR, "Failed to disable CRTC %"PRIu32,
+ conn->crtc->id);
}
drm_plane_finish_surface(conn->crtc->primary);