From e45d7f70e8dcd0d3e42a6ee45738801d9a6bd41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 24 Jul 2017 15:09:38 +0800 Subject: [PATCH] crtc-kms: Don't set normal transform when no transforms are supported On a CRTC that doesn't report any transforms at all, setting the normal transform will fail. Avoid failing by checking if any transforms are supported before applying it, and early out if no transforms are supported. https://bugzilla.gnome.org/show_bug.cgi?id=785381 --- src/backends/native/meta-crtc-kms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-crtc-kms.c b/src/backends/native/meta-crtc-kms.c index d34c94ff5..29b828055 100644 --- a/src/backends/native/meta-crtc-kms.c +++ b/src/backends/native/meta-crtc-kms.c @@ -69,6 +69,9 @@ meta_crtc_kms_apply_transform (MetaCrtc *crtc) else hw_transform = META_MONITOR_TRANSFORM_NORMAL; + if (!meta_crtc_kms_is_transform_handled (crtc, META_MONITOR_TRANSFORM_NORMAL)) + return; + if (drmModeObjectSetProperty (kms_fd, crtc_kms->primary_plane_id, DRM_MODE_OBJECT_PLANE,