mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
backend/drm: fix enabling an output with a custom mode set
Since 5567aefb1c ("backend/drm: Don't add pollute fixed modes
list with custom modes"), when a custom mode is set on an output,
current_mode will be NULL.
Instead of checking current_mode, check width/height.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3946
This commit is contained in:
parent
ca1f9f86e6
commit
94cb8e2bc7
1 changed files with 6 additions and 7 deletions
|
|
@ -828,14 +828,13 @@ static bool drm_connector_prepare(struct wlr_drm_connector_state *conn_state, bo
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((state->committed & WLR_OUTPUT_STATE_ENABLED) && state->enabled) {
|
if ((state->committed & WLR_OUTPUT_STATE_ENABLED) && state->enabled &&
|
||||||
if (output->current_mode == NULL &&
|
output->width == 0 && output->height == 0 &&
|
||||||
!(state->committed & WLR_OUTPUT_STATE_MODE)) {
|
!(state->committed & WLR_OUTPUT_STATE_MODE)) {
|
||||||
wlr_drm_conn_log(conn, WLR_DEBUG,
|
wlr_drm_conn_log(conn, WLR_DEBUG,
|
||||||
"Can't enable an output without a mode");
|
"Can't enable an output without a mode");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
|
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
|
||||||
state->adaptive_sync_enabled &&
|
state->adaptive_sync_enabled &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue