aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-06-27 11:14:55 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-06-27 11:14:55 -0400
commit5567aefb1c5690ac5aab1cc05f6b5e52b62c246c (patch)
treea617a1f56292b57fafbb2038af07c660e7d94b78 /backend/drm
parentea3c6fde3a542bd54340eafb43824529053be2d8 (diff)
backend/drm: Don't add pollute fixed modes list with custom modes
Nobody remembers why this is done and it isn't that great if people use a lot of custom modes.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index a4853ffa..384971d1 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -763,16 +763,17 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
conn->crtc = NULL;
}
if (pending.base->committed & WLR_OUTPUT_STATE_MODE) {
- struct wlr_output_mode *mode = NULL;
switch (pending.base->mode_type) {
case WLR_OUTPUT_STATE_MODE_FIXED:
- mode = pending.base->mode;
+ wlr_output_update_mode(&conn->output, pending.base->mode);
break;
case WLR_OUTPUT_STATE_MODE_CUSTOM:
- mode = wlr_drm_connector_add_mode(&conn->output, &pending.mode);
+ wlr_output_update_custom_mode(&conn->output,
+ pending.base->custom_mode.width,
+ pending.base->custom_mode.height,
+ pending.base->custom_mode.refresh);
break;
}
- wlr_output_update_mode(&conn->output, mode);
}
if (flags & DRM_MODE_PAGE_FLIP_EVENT) {
conn->pending_page_flip_crtc = conn->crtc->id;