summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_fb.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-05-04 16:28:10 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-05 12:53:25 -0500
commitc722466a602794002b374ef0f84de0a92d9cd531 (patch)
tree51c5a8b1a9d66356b7fb260fac8cc1186b2f4936 /src/lib/ecore_drm2/ecore_drm2_fb.c
parent1071c9f3a8731e37e4e83d024519a44cd56a44f2 (diff)
ecore_drm2: Replace plane state release flag with plane dead flag
The release flag is actually less useful than the existing in_use flag for determining if a plane is unused. If a new plane is assigned before the next flip cleans up released planes, then it can point to a released plane state, and both it and the previous user will be freed on the next commit, leaking a plane. Putting the flag in the plane structure fixes this while still allowing us to keep released planes around to ensure a recently released plane is cleared from atomic state.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 04af3b1325..ea20bb2fbd 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -240,7 +240,7 @@ ecore_drm2_fb_flip_complete(Ecore_Drm2_Output *output)
240 240
241 EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane) 241 EINA_LIST_FOREACH_SAFE(output->planes, l, ll, plane)
242 { 242 {
243 if (!plane->state->release) continue; 243 if (!plane->dead) continue;
244 output->planes = eina_list_remove_list(output->planes, l); 244 output->planes = eina_list_remove_list(output->planes, l);
245 free(plane); 245 free(plane);
246 } 246 }
@@ -283,7 +283,7 @@ _fb_atomic_flip_test(Ecore_Drm2_Output *output)
283 { 283 {
284 pstate = plane->state; 284 pstate = plane->state;
285 285
286 if (pstate->release) 286 if (!pstate->in_use)
287 { 287 {
288 pstate->cid.value = 0; 288 pstate->cid.value = 0;
289 pstate->fid.value = 0; 289 pstate->fid.value = 0;