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.
This commit is contained in:
parent
1a2e82e327
commit
b03eebf7d4
|
@ -564,14 +564,19 @@ static bool drm_connector_commit(struct wlr_output *output) {
|
||||||
if (!drm_connector_set_mode(conn, wlr_mode)) {
|
if (!drm_connector_set_mode(conn, wlr_mode)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} else if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||||
|
// TODO: support modesetting with a buffer
|
||||||
// TODO: support modesetting with a buffer
|
|
||||||
if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER &&
|
|
||||||
!(output->pending.committed & WLR_OUTPUT_STATE_MODE)) {
|
|
||||||
if (!drm_connector_commit_buffer(output)) {
|
if (!drm_connector_commit_buffer(output)) {
|
||||||
return false;
|
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;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue