diff options
author | Simon Ser <contact@emersion.fr> | 2022-11-15 10:06:23 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-11-15 10:06:23 +0100 |
commit | a40ba16a6414f72ae0224164bb08cd8479dc52ee (patch) | |
tree | 66a1ae82effebf764cf77d761bd0f5ba2594f706 /backend | |
parent | 5b34fe55136cca32c10e70e5fe44fea2d7c6520d (diff) |
backend/drm: fix FPE when disabling output
Fixes: 65836ce357e4 ("backend/drm: log modesetting commits")
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3534
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index c577bffc..a3daf23f 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -582,9 +582,13 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, } if (pending.modeset) { - wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", - pending.mode.hdisplay, pending.mode.vdisplay, - (float)calculate_refresh_rate(&pending.mode) / 1000); + if (pending.active) { + wlr_drm_conn_log(conn, WLR_INFO, "Modesetting with %dx%d @ %.3f Hz", + pending.mode.hdisplay, pending.mode.vdisplay, + (float)calculate_refresh_rate(&pending.mode) / 1000); + } else { + wlr_drm_conn_log(conn, WLR_INFO, "Turning off"); + } } if (!drm_crtc_commit(conn, &pending, flags, false)) { |