summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-05-03 10:57:28 -0400
committerDerek Foreman <derekf@osg.samsung.com>2017-05-04 16:51:18 -0500
commitf124c84b13eda2ae7dadf57ba941453fd2317cd9 (patch)
tree47faf9507db397f255605e46c6e547aeccd81ae3
parent4e46b3adf048e34d019c8a05a7b56be1ead44431 (diff)
downloadefl-f124c84b13eda2ae7dadf57ba941453fd2317cd9.tar.gz
ecore-drm2: Release any marked planes during atomic commit
This patch fixes plane_state values during atomic flip test for any planes marked for release. When the fb_flip actually completes, we will remove the marked plane(s) from the output. Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 5cb0eb7ece..fbf5c5faa6 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -232,8 +232,19 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
output->pending.fb = NULL;
#ifdef HAVE_ATOMIC_DRM
+ Eina_List *l, *ll;
+ Ecore_Drm2_Plane *plane;
+
output->current.atomic_req = output->pending.atomic_req;
output->pending.atomic_req = NULL;
+
+ EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
+ {
+ if (!plane->state->release) continue;
+ output->planes = eina_list_remove_list(output->planes, l);
+ free(plane);
+ }
+
#endif
return !!output->next.fb;
}
@@ -273,6 +284,18 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
{
pstate = plane->state;
+ if (pstate->release)
+ {
+ pstate->cid.value = 0;
+ pstate->fid.value = 0;
+ pstate->sw.value = 0;
+ pstate->sh.value = 0;
+ pstate->cx.value = 0;
+ pstate->cy.value = 0;
+ pstate->cw.value = 0;
+ pstate->ch.value = 0;
+ }
+
ret =
sym_drmModeAtomicAddProperty(req, pstate->obj_id,
pstate->cid.id, pstate->cid.value);