[mutter] crtc-kms: Don't set normal transform when no transforms are supported



commit e45d7f70e8dcd0d3e42a6ee45738801d9a6bd41b
Author: Jonas Ådahl <jadahl gmail com>
Date:   Mon Jul 24 15:09:38 2017 +0800

    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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-crtc-kms.c b/src/backends/native/meta-crtc-kms.c
index d34c94f..29b8280 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]