aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-06 15:44:32 +0200
committerSimon Ser <contact@emersion.fr>2021-04-06 20:35:15 +0200
commit7efc2d05b7c22e3f355512de98ccc9d5508468c3 (patch)
tree51e1ce499b3eecdc9c19087819b7f363a26854b8 /backend
parent5088e25eaf8aca2934acd315b88524b6c7937188 (diff)
backend/drm: downgrade test-only commit failure log level
Let's not clutter the logs with error messages when a test-only atomic commit fails.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/atomic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c
index 310138f0..4cfd5566 100644
--- a/backend/drm/atomic.c
+++ b/backend/drm/atomic.c
@@ -31,8 +31,10 @@ static bool atomic_commit(struct atomic *atom,
}
int ret = drmModeAtomicCommit(drm->fd, atom->req, flags, drm);
- if (ret) {
- wlr_drm_conn_log_errno(conn, WLR_ERROR, "Atomic %s failed (%s)",
+ if (ret != 0) {
+ wlr_drm_conn_log_errno(conn,
+ (flags & DRM_MODE_ATOMIC_TEST_ONLY) ? WLR_DEBUG : WLR_ERROR,
+ "Atomic %s failed (%s)",
(flags & DRM_MODE_ATOMIC_TEST_ONLY) ? "test" : "commit",
(flags & DRM_MODE_ATOMIC_ALLOW_MODESET) ? "modeset" : "pageflip");
return false;