diff options
author | Chris Michael <cp.michael@samsung.com> | 2017-05-03 10:57:28 -0400 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2017-05-05 12:53:24 -0500 |
commit | 1d3ad708883df60a6dbae435768fcc4870da6d2b (patch) | |
tree | 47faf9507db397f255605e46c6e547aeccd81ae3 /src/lib/ecore_drm2/ecore_drm2_fb.c | |
parent | 0c0f525d9aa5dc09bd0c9a78526f7149b0ceff79 (diff) |
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>
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_fb.c | 23 |
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) | |||
232 | output->pending.fb = NULL; | 232 | output->pending.fb = NULL; |
233 | 233 | ||
234 | #ifdef HAVE_ATOMIC_DRM | 234 | #ifdef HAVE_ATOMIC_DRM |
235 | Eina_List *l, *ll; | ||
236 | Ecore_Drm2_Plane *plane; | ||
237 | |||
235 | output->current.atomic_req = output->pending.atomic_req; | 238 | output->current.atomic_req = output->pending.atomic_req; |
236 | output->pending.atomic_req = NULL; | 239 | output->pending.atomic_req = NULL; |
240 | |||
241 | EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane) | ||
242 | { | ||
243 | if (!plane->state->release) continue; | ||
244 | output->planes = eina_list_remove_list(output->planes, l); | ||
245 | free(plane); | ||
246 | } | ||
247 | |||
237 | #endif | 248 | #endif |
238 | return !!output->next.fb; | 249 | return !!output->next.fb; |
239 | } | 250 | } |
@@ -273,6 +284,18 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output) | |||
273 | { | 284 | { |
274 | pstate = plane->state; | 285 | pstate = plane->state; |
275 | 286 | ||
287 | if (pstate->release) | ||
288 | { | ||
289 | pstate->cid.value = 0; | ||
290 | pstate->fid.value = 0; | ||
291 | pstate->sw.value = 0; | ||
292 | pstate->sh.value = 0; | ||
293 | pstate->cx.value = 0; | ||
294 | pstate->cy.value = 0; | ||
295 | pstate->cw.value = 0; | ||
296 | pstate->ch.value = 0; | ||
297 | } | ||
298 | |||
276 | ret = | 299 | ret = |
277 | sym_drmModeAtomicAddProperty(req, pstate->obj_id, | 300 | sym_drmModeAtomicAddProperty(req, pstate->obj_id, |
278 | pstate->cid.id, pstate->cid.value); | 301 | pstate->cid.id, pstate->cid.value); |