ecore-drm2: Update plane state values based on FB
authorChristopher Michael <cp.michael@samsung.com>
Fri, 22 Mar 2019 16:41:08 +0000 (12:41 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
Summary:
When we are trying to set an FB onto a plane, we need to update the
plane state values to reflect any changes in the FB. Failure to do
this will result in Atomic Commit failures as the plane state values
will not match what the FB is.

ref T7690

@fix

Depends on D8110

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

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

src/lib/ecore_drm2/ecore_drm2_plane.c

index b9601cc..6dfa0bc 100644 (file)
@@ -181,6 +181,13 @@ ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb)
 
    fallback_id = plane->state->fid.value;
    plane->state->fid.value = fb->id;
+
+   /* Update plane state based on fb */
+   plane->state->sw.value = fb->w << 16;
+   plane->state->sh.value = fb->h << 16;
+   plane->state->cw.value = fb->w;
+   plane->state->ch.value = fb->h;
+
    if (_fb_atomic_flip_test(plane->output))
      {
         _ecore_drm2_fb_ref(fb);