derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=373e4b068430f2515b4875ed08ca51118eb4108c

commit 373e4b068430f2515b4875ed08ca51118eb4108c
Author: Chris Michael <[email protected]>
Date:   Wed May 3 09:22:45 2017 -0400

    ecore-drm2: Don't assign plane to output list if test fails
    
    There is little point in assigning a plane to the output list if the
    atomic flip test fails.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm2/ecore_drm2_plane.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c 
b/src/lib/ecore_drm2/ecore_drm2_plane.c
index 6f2666d..6729486 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -106,17 +106,17 @@ out:
    plane->type = pstate->type.value;
    plane->output = output;
 
-   DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
-   output->planes = eina_list_append(output->planes, plane);
-
    if (!_fb_atomic_flip_test(output))
      {
-        output->planes = eina_list_remove(output->planes, plane);
         plane->state->in_use = EINA_FALSE;
         free(plane);
 
         return NULL;
      }
+
+   DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
+   output->planes = eina_list_append(output->planes, plane);
+
    return plane;
 }
 

-- 


Reply via email to