diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-27 17:59:16 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-06-01 11:45:11 -0600 |
commit | b03eebf7d4e76d9f00ea595767c6916c7fd79169 (patch) | |
tree | a2f61a3ed48d50b2b5742cfef5bd20e89cc816be /backend/drm | |
parent | 1a2e82e32711c4d667d82c00cc5f982c6ca55957 (diff) |
backend/drm: always perform a CRTC commit in drm_connector_commit
When the mode, status or buffer hasn't changed, drm_connector_commit was
a no-op. Because of this individual changes to the gamma LUT or adaptive
sync status were ignored (if committed without a buffer).
Instead, perform a commit to apply the changes.
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 7d066b2d..f034bf9f 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -564,14 +564,19 @@ static bool drm_connector_commit(struct wlr_output *output) { if (!drm_connector_set_mode(conn, wlr_mode)) { return false; } - } - - // TODO: support modesetting with a buffer - if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER && - !(output->pending.committed & WLR_OUTPUT_STATE_MODE)) { + } else if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { + // TODO: support modesetting with a buffer if (!drm_connector_commit_buffer(output)) { return false; } + } else if (output->pending.committed & + (WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED | + WLR_OUTPUT_STATE_GAMMA_LUT)) { + assert(conn->crtc != NULL); + // TODO: maybe request a page-flip event here? + if (!drm_crtc_commit(conn, 0)) { + return false; + } } return true; |