mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04: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,13 +828,12 @@ static bool drm_connector_prepare(struct wlr_drm_connector_state *conn_state, bo
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((state->committed & WLR_OUTPUT_STATE_ENABLED) && state->enabled) {
|
||||
if (output->current_mode == NULL &&
|
||||
!(state->committed & WLR_OUTPUT_STATE_MODE)) {
|
||||
wlr_drm_conn_log(conn, WLR_DEBUG,
|
||||
"Can't enable an output without a mode");
|
||||
return false;
|
||||
}
|
||||
if ((state->committed & WLR_OUTPUT_STATE_ENABLED) && state->enabled &&
|
||||
output->width == 0 && output->height == 0 &&
|
||||
!(state->committed & WLR_OUTPUT_STATE_MODE)) {
|
||||
wlr_drm_conn_log(conn, WLR_DEBUG,
|
||||
"Can't enable an output without a mode");
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue