mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
backend/drm: Do not log on test commit failure
A test commit failure is a normal condition, and can easily end up happening once per frame, such as when direct scan-out is attempted. Only log when non-test commits fail.
This commit is contained in:
parent
a8d1e5273a
commit
f55eacac98
1 changed files with 3 additions and 5 deletions
|
|
@ -71,16 +71,14 @@ static bool atomic_commit(struct atomic *atom, struct wlr_drm_backend *drm,
|
|||
|
||||
int ret = drmModeAtomicCommit(drm->fd, atom->req, flags, page_flip);
|
||||
if (ret != 0) {
|
||||
enum wlr_log_importance log_level = WLR_ERROR;
|
||||
if (flags & DRM_MODE_ATOMIC_TEST_ONLY) {
|
||||
log_level = WLR_DEBUG;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state->connectors_len == 1) {
|
||||
struct wlr_drm_connector *conn = state->connectors[0].connector;
|
||||
wlr_drm_conn_log_errno(conn, log_level, "Atomic commit failed");
|
||||
wlr_drm_conn_log_errno(conn, WLR_ERROR, "Atomic commit failed");
|
||||
} else {
|
||||
wlr_log_errno(log_level, "Atomic commit failed");
|
||||
wlr_log_errno(WLR_ERROR, "Atomic commit failed");
|
||||
}
|
||||
char *flags_str = atomic_commit_flags_str(flags);
|
||||
wlr_log(WLR_DEBUG, "(Atomic commit flags: %s)",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue