[PATCH weston 07/13] compositor-drm: Enable the stereo capability.

Emmanuel Gil Peyrot linkmauve at linkmauve.fr
Tue Nov 14 15:05:54 UTC 2017


From: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>

This makes DRM list the stereo modes in addition to the usual mono
ones, it’s now just a matter of modeset whether we enable stereo or
not.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve at linkmauve.fr>
---
 libweston/compositor-drm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index b641d61e..d3480f08 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -2081,6 +2081,13 @@ init_kms_caps(struct drm_backend *b)
 
 	weston_log("using %s\n", b->drm.filename);
 
+	if (!b->use_pixman) {
+		ret = drmSetClientCap(b->drm.fd, DRM_CLIENT_CAP_STEREO_3D, 1);
+		if (ret == 0)
+			b->compositor->capabilities |= WESTON_CAP_STEREOSCOPY;
+		weston_log("DRM: %sstereo support\n", ret != 0 ? "no " : "");
+	}
+
 	ret = drmGetCap(b->drm.fd, DRM_CAP_TIMESTAMP_MONOTONIC, &cap);
 	if (ret == 0 && cap == 1)
 		clk_id = CLOCK_MONOTONIC;
-- 
2.15.0



More information about the wayland-devel mailing list