ecore-drm2: Don't use AtomicAddProperty for plane rotation
authorChristopher Michael <cp.michael@samsung.com>
Fri, 22 Mar 2019 16:41:03 +0000 (12:41 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
Summary:
Apparently something has been changed recently in libdrm
that causes AtomicAddProperty to fail when trying to set plane rotation. Until
this can be found & fixed, let's just disable trying to rotate
hardware planes with atomic commits.

ref T7690

@fix

Reviewers: raster, cedric, zmike

Subscribers: zmike, cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8110

src/lib/ecore_drm2/ecore_drm2_fb.c

index 6888a3c..017f981 100644 (file)
@@ -413,6 +413,25 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
           sym_drmModeAtomicAddProperty(req, pstate->obj_id,
                                        pstate->ch.id, pstate->ch.value);
         if (ret < 0) goto err;
+
+#if 0
+        /* XXX: Disable hardware plane rotation for now as this has broken
+         * recently. The break happens because of an invalid argument,
+         * ie: the value being sent from pstate->rotation_map ends up being
+         * incorrect for some reason. I suspect the breakage to be from
+         * kernel drivers (linux 4.20.0) but have not confirmed that version */
+        if ((pstate->rotation.id) &&
+            (pstate->type.value == DRM_PLANE_TYPE_PRIMARY))
+          {
+             DBG("Plane %d Atomic Rotation: %lu",
+                 pstate->obj_id, pstate->rotation.value);
+             ret =
+               sym_drmModeAtomicAddProperty(req, pstate->obj_id,
+                                            pstate->rotation.id,
+                                            pstate->rotation_map[pstate->rotation.value]);
+             if (ret < 0) goto err;
+          }
+#endif
      }
 
    ret =