From 6482367aa2010c244bf109c26e0460f34f85332d Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 27 Apr 2017 15:53:16 -0500 Subject: [PATCH] ecore_drm2: Perform test flip during plane assignment Make sure we can commit that plane at assign time so when we hook up to the scene graph it knows when it can safely use a plane. --- src/lib/ecore_drm2/ecore_drm2_plane.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c index 155c932bf5..9ebc1d96ff 100644 --- a/src/lib/ecore_drm2/ecore_drm2_plane.c +++ b/src/lib/ecore_drm2/ecore_drm2_plane.c @@ -109,6 +109,14 @@ out: 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; + } return plane; }