mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-09 13:29:46 -05:00
backend/drm: modeset before enabling an output
This saves one modeset in case the previous mode is different.
This commit is contained in:
parent
5d1ba0f446
commit
f0781cd792
1 changed files with 6 additions and 6 deletions
|
|
@ -422,12 +422,6 @@ static bool drm_connector_commit(struct wlr_output *output) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
|
||||
if (!enable_drm_connector(output, output->pending.enabled)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_MODE) {
|
||||
switch (output->pending.mode_type) {
|
||||
case WLR_OUTPUT_STATE_MODE_FIXED:
|
||||
|
|
@ -446,6 +440,12 @@ static bool drm_connector_commit(struct wlr_output *output) {
|
|||
}
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
|
||||
if (!enable_drm_connector(output, output->pending.enabled)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
if (!drm_connector_commit_buffer(output)) {
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue