diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-09-23 13:38:43 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-09-23 13:38:43 +1200 |
commit | 8cbade355f197e919e7d392a06b9b2851bf847cc (patch) | |
tree | a5d0f9dd35e387e407866550325b88e0b5c85088 /backend/drm | |
parent | 4a53aab4663a2d26fa10d913222986201c080fbd (diff) |
Print connector name on atomic commit failure
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm-atomic.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/backend/drm/drm-atomic.c b/backend/drm/drm-atomic.c index a6523331..5d34cd48 100644 --- a/backend/drm/drm-atomic.c +++ b/backend/drm/drm-atomic.c @@ -43,7 +43,7 @@ static bool atomic_end(int drm_fd, struct atomic *atom) { } static bool atomic_commit(int drm_fd, struct atomic *atom, - struct wlr_drm_output *output, uint32_t flag) { + struct wlr_drm_output *output, uint32_t flag, bool modeset) { if (atom->failed) { return false; } @@ -52,13 +52,15 @@ static bool atomic_commit(int drm_fd, struct atomic *atom, int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output); if (ret) { - wlr_log_errno(L_ERROR, "Atomic commit failed"); + wlr_log_errno(L_ERROR, "%s: Atomic commit failed (%s)", + output->output.name, modeset ? "modeset" : "pageflip"); // Try to commit without new changes drmModeAtomicSetCursor(atom->req, atom->cursor); ret = drmModeAtomicCommit(drm_fd, atom->req, flags, output); if (ret) { - wlr_log_errno(L_ERROR, "Atomic commit failed"); + wlr_log_errno(L_ERROR, "%s: Atomic commit failed (%s)", + output->output.name, modeset ? "modeset" : "pageflip"); } } @@ -116,8 +118,9 @@ static bool atomic_crtc_pageflip(struct wlr_drm_backend *backend, atomic_add(&atom, crtc->id, crtc->props.mode_id, crtc->mode_id); atomic_add(&atom, crtc->id, crtc->props.active, 1); set_plane_props(&atom, crtc->primary, crtc->id, fb_id, true); - return atomic_commit(backend->fd, &atom, - output, mode ? DRM_MODE_ATOMIC_ALLOW_MODESET : DRM_MODE_ATOMIC_NONBLOCK); + return atomic_commit(backend->fd, &atom, output, + mode ? DRM_MODE_ATOMIC_ALLOW_MODESET : DRM_MODE_ATOMIC_NONBLOCK, + mode); } static void atomic_conn_enable(struct wlr_drm_backend *backend, |