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>
This commit is contained in:
Chris Michael 2017-05-03 10:57:28 -04:00 committed by Derek Foreman
parent 0c0f525d9a
commit 1d3ad70888
1 changed files with 23 additions and 0 deletions

View File

@ -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);