mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-21 05:34:09 -04:00
backend/drm: use request_state when a CRTC becomes available
This commit is contained in:
parent
246e5b5833
commit
4abd26ac55
1 changed files with 8 additions and 2 deletions
|
|
@ -760,8 +760,14 @@ static void attempt_enable_needs_modeset(struct wlr_drm_backend *drm) {
|
||||||
conn->crtc != NULL && conn->desired_mode != NULL &&
|
conn->crtc != NULL && conn->desired_mode != NULL &&
|
||||||
conn->desired_enabled) {
|
conn->desired_enabled) {
|
||||||
wlr_drm_conn_log(conn, WLR_DEBUG,
|
wlr_drm_conn_log(conn, WLR_DEBUG,
|
||||||
"Output has a desired mode and a CRTC, attempting a modeset");
|
"Output has a desired mode and a CRTC, requesting a modeset");
|
||||||
drm_connector_set_mode(conn, conn->desired_mode);
|
struct wlr_output_state state = {
|
||||||
|
.committed = WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_ENABLED,
|
||||||
|
.mode_type = WLR_OUTPUT_STATE_MODE_FIXED,
|
||||||
|
.mode = conn->desired_mode,
|
||||||
|
.enabled = true,
|
||||||
|
};
|
||||||
|
wlr_output_send_request_state(&conn->output, &state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue