diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-09-24 12:19:49 +1300 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-09-24 12:19:49 +1300 |
commit | c8c5aedaa21e7b8c0a47761a987ab5770b674f0b (patch) | |
tree | 90fcd241d2c7058519974e988c2a8478c4be4bf1 /backend | |
parent | 419400ae00b8c223eaa4ded9ba93c2f6e9a02dd8 (diff) |
Add error checking to DRM legacy
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/drm-legacy.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/backend/drm/drm-legacy.c b/backend/drm/drm-legacy.c index 5077fcab..9b7cd301 100644 --- a/backend/drm/drm-legacy.c +++ b/backend/drm/drm-legacy.c @@ -9,11 +9,17 @@ static bool legacy_crtc_pageflip(struct wlr_drm_backend *backend, struct wlr_drm_output *output, struct wlr_drm_crtc *crtc, uint32_t fb_id, drmModeModeInfo *mode) { if (mode) { - drmModeSetCrtc(backend->fd, crtc->id, fb_id, 0, 0, - &output->connector, 1, mode); + if (drmModeSetCrtc(backend->fd, crtc->id, fb_id, 0, 0, + &output->connector, 1, mode)) { + wlr_log_errno(L_ERROR, "%s: Failed to set CRTC", output->output.name); + return false; + } } - drmModePageFlip(backend->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, output); + if (drmModePageFlip(backend->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, output)) { + wlr_log_errno(L_ERROR, "%s: Failed to page flip", output->output.name); + return false; + } return true; } |