From: Derek Foreman Date: Mon, 15 May 2017 19:29:55 +0000 (-0500) Subject: ecore_drm2: Clear next fb if we use it X-Git-Tag: upstream/1.20.0~1060 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88f328efd2d92f02c6a680872263227d3ac95f8d;p=platform%2Fupstream%2Fefl.git 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 --- diff --git a/src/lib/ecore_drm2/ecore_drm2_fb.c b/src/lib/ecore_drm2/ecore_drm2_fb.c index 114280b..71ea60d 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! */