diff options
author | Rouven Czerwinski <rouven@czerwinskis.de> | 2019-09-03 16:06:49 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-09-05 10:25:12 +0300 |
commit | bf90474b74064503be0957ae713db833ddec5529 (patch) | |
tree | 550f600c6dbb7a0af503430f7389be7c11496632 /backend/drm | |
parent | 734c64a6cc005f2c20df48af8079538a8c4cbd39 (diff) |
backend/drm: check for mst: in path property
Instead of checking that the path property is not 0 to determine if the
connector is an MST connector, check if the path contains the mst:
string.
Fixes #1813
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/drm.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 85c750dd..ca23a1b6 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1304,8 +1304,17 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) { wl_list_insert(&wlr_conn->output.modes, &mode->wlr_mode.link); } + size_t path_len; + bool is_mst = false; + char *path = get_drm_prop_blob(drm->fd, wlr_conn->id, + wlr_conn->props.path, &path_len); + if (path_len > 4 && path && strncmp(path, "mst:", 4) == 0) { + is_mst = true; + } + free(path); + wlr_conn->possible_crtc = get_possible_crtcs(drm->fd, res, drm_conn, - wlr_conn->props.path != 0); + is_mst); if (wlr_conn->possible_crtc == 0) { wlr_log(WLR_ERROR, "No CRTC possible for connector '%s'", wlr_conn->output.name); |