mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-14 06:59:43 -05:00
backend/drm: fix enabling an output with a custom mode set
Since5567aefb1c("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 (cherry picked from commit94cb8e2bc7)
This commit is contained in:
parent
bcba7cb12b
commit
38f18cd684
1 changed files with 6 additions and 7 deletions
|
|
@ -796,13 +796,12 @@ 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) &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue