mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
backend/drm: ensure connector gets the correct CRTC after session activation
Signed-off-by: sunzhguy <sunzhigang1@kylinos.cn>
This commit is contained in:
parent
5eed5d622d
commit
b865fd3cdc
1 changed files with 9 additions and 0 deletions
|
|
@ -1353,6 +1353,12 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
|
|||
// On GPU unplug, disabling the CRTC can fail with EPERM
|
||||
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to disable CRTC %"PRIu32,
|
||||
conn->crtc->id);
|
||||
drm_plane_finish_surface(conn->crtc->primary);
|
||||
drm_plane_finish_surface(conn->crtc->cursor);
|
||||
drm_fb_clear(&conn->cursor_pending_fb);
|
||||
|
||||
conn->cursor_enabled = false;
|
||||
conn->crtc = NULL;
|
||||
}
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
|
@ -1598,6 +1604,9 @@ static bool connect_drm_connector(struct wlr_drm_connector *wlr_conn,
|
|||
struct wlr_drm_backend *drm = wlr_conn->backend;
|
||||
struct wlr_output *output = &wlr_conn->output;
|
||||
|
||||
if (wlr_conn->crtc == NULL) {
|
||||
wlr_conn->crtc = connector_get_current_crtc(wlr_conn, drm_conn);
|
||||
}
|
||||
wlr_log(WLR_DEBUG, "Current CRTC: %d",
|
||||
wlr_conn->crtc ? (int)wlr_conn->crtc->id : -1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue