diff options
Diffstat (limited to 'backend/drm/legacy.c')
-rw-r--r-- | backend/drm/legacy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c index dad45253..43436165 100644 --- a/backend/drm/legacy.c +++ b/backend/drm/legacy.c @@ -32,10 +32,12 @@ static bool legacy_crtc_commit(struct wlr_drm_backend *drm, uint32_t *conns = NULL; size_t conns_len = 0; drmModeModeInfo *mode = NULL; + drmModeModeInfo mode_info = {0}; if (active) { conns = &conn->id; conns_len = 1; - mode = &crtc->pending.mode->drm_mode; + drm_connector_state_mode(conn, state, &mode_info); + mode = &mode_info; } uint32_t dpms = active ? DRM_MODE_DPMS_ON : DRM_MODE_DPMS_OFF; |