summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-05-15 14:29:55 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-15 16:22:12 -0500
commit88f328efd2d92f02c6a680872263227d3ac95f8d (patch)
tree1d6bc3d49fbc81286e63f90d9bd086ac1c1ce31a
parentddfc6f0632e3099632f98504e9ffcd341250ed1e (diff)
downloadefl-88f328efd2d92f02c6a680872263227d3ac95f8d.tar.gz
ecore_drm2: Clear next fb if we use it
Fixes a race that's either really hard to hit if you're a developer or really easy to hit if you're a user. Thanks to ApB for the debug assistance. Fix T5484
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_fb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c
index 114280b62d..71ea60df18 100644
--- a/src/lib/ecore_drm2/ecore_drm2_fb.c
+++ b/src/lib/ecore_drm2/ecore_drm2_fb.c
@@ -548,12 +548,16 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
output->next.fb = fb;
return 0;
}
- if (!fb) fb = output->next.fb;
+ if (!fb)
+ {
+ fb = output->next.fb;
+ output->next.fb = NULL;
+ }
/* So we can generate a tick by flipping to the current fb */
if (!fb) fb = output->current.fb;
- if (output->next.fb && fb != output->next.fb)
+ if (output->next.fb)
_release_buffer(output, &output->next);
/* If we don't have an fb to set by now, BAIL! */