backend/drm: remove wlr_drm_crtc_state.mode

Replace it with drm_connector_state_mode, which computes the mode
from the wlr_output_state to be applied.
This commit is contained in:
Simon Ser 2021-04-06 17:29:07 +02:00 committed by Kenny Levinsen
parent dfea0ff31d
commit 31082a0554
4 changed files with 34 additions and 18 deletions

View file

@ -62,7 +62,9 @@ static bool create_mode_blob(struct wlr_drm_backend *drm,
return true;
}
if (drmModeCreatePropertyBlob(drm->fd, &conn->crtc->pending.mode->drm_mode,
drmModeModeInfo mode = {0};
drm_connector_state_mode(conn, state, &mode);
if (drmModeCreatePropertyBlob(drm->fd, &mode,
sizeof(drmModeModeInfo), blob_id)) {
wlr_log_errno(WLR_ERROR, "Unable to create mode property blob");
return false;