Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

backend/drm: atomic improvements #2238

Merged
merged 5 commits into from
Jun 1, 2020
Merged

Conversation

emersion
Copy link
Member

@emersion emersion commented Jun 1, 2020

This PR:

  • Makes adaptive sync atomic
  • Performs a blocking atomic commit if no modeset or buffer is pending

The second point fixes output state updates not applied when no modeset or page-flip is performed. For instance, wlr_output_set_gamma followed by wlr_output_commit was a no-op (but shouldn't be).

No Sway PR required, since wlr_output_enable_adaptive_sync is already followed by wlr_output_commit.

Closes: #2096


Breaking change: wlr_output_enable_adaptive_sync must now be followed by wlr_output_commit to apply the change.

A test commit doesn't apply the pending state.

The CRTC state will be populated again if the compositor decides to
perform a regular commit afterwards.
Stop using drmModeObjectSetProperty, set the property in the crtc_commit
function instead.
We need to perform the FB bookkeeping on all commits, not just on
page-flips.
drm_connector_set_mode already takes care of keeping this up-to-date.
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.
@emersion emersion added the breaking Breaking change in public API label Jun 1, 2020
@ddevault ddevault merged commit b03eebf into swaywm:master Jun 1, 2020
@ddevault
Copy link
Contributor

ddevault commented Jun 1, 2020

Thank you!

@emersion emersion added this to the 0.11.0 milestone Jul 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change in public API
Development

Successfully merging this pull request may close these issues.

backend/drm: rework atomic support
2 participants