diff options
author | Simon Ser <contact@emersion.fr> | 2022-06-07 15:03:39 +0200 |
---|---|---|
committer | Isaac Freund <mail@isaacfreund.com> | 2022-06-19 16:55:36 +0000 |
commit | 1d581656c756fd17a6cf55474d32586f6769663f (patch) | |
tree | 61300f6bbaa3b7f93520e38ee16ec8cb5b1b0154 /backend/drm/drm.c | |
parent | 1f1c0275be21f02a430b3a9fd51bba9ba5be57d1 (diff) |
backend/drm: set "max bpc" to the max
"max bpc" is a maximum value, the driver is free to choose a
smaller value depending on the bandwidth available.
Some faulty monitors misbehave with higher bpc values. We'll add
a workaround if users get hit by these in practice.
References: https://gitlab.freedesktop.org/wayland/weston/-/issues/612
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 1c22878c..262a533e 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1317,6 +1317,14 @@ void scan_drm_connectors(struct wlr_drm_backend *drm, wlr_conn->output.non_desktop = non_desktop; } + wlr_conn->max_bpc = 0; + if (wlr_conn->props.max_bpc != 0) { + if (!introspect_drm_prop_range(drm->fd, wlr_conn->props.max_bpc, + NULL, &wlr_conn->max_bpc)) { + wlr_log(WLR_ERROR, "Failed to introspect 'max bpc' property"); + } + } + size_t edid_len = 0; uint8_t *edid = get_drm_prop_blob(drm->fd, wlr_conn->id, wlr_conn->props.edid, &edid_len); |