ecore_drm2: ERR once when page flip fails with EBUSY

On systems where this happens it'll probably happen a lot, so
we don't want to continuously log this, but since it's definitely
showing a bug somewhere (efl or kernel) it probably should be an ERR.
This commit is contained in:
Derek Foreman 2017-02-15 09:51:32 -06:00
parent a9497131f7
commit ae5d002466
1 changed files with 10 additions and 3 deletions

View File

@ -424,6 +424,7 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
do
{
static Eina_Bool bugged_about_bug = EINA_FALSE;
repeat = EINA_FALSE;
ret = sym_drmModePageFlip(fb->fd, output->crtc_id, fb->id,
DRM_MODE_PAGE_FLIP_EVENT,
@ -434,12 +435,18 @@ ecore_drm2_fb_flip(Ecore_Drm2_Fb *fb, Ecore_Drm2_Output *output)
* until we can flip or we give up (100 tries with a yield
* between each try). We can't expect everyone to run the
* latest bleeding edge kernel IF a workaround is possible
* in userspace, so do this. */
* in userspace, so do this.
* We only report this as an ERR once since if it will
* generate a huge amount of spam otherwise. */
if ((ret < 0) && (errno == EBUSY))
{
repeat = EINA_TRUE;
if (count == 0)
WRN("Pageflip fail - EBUSY from drmModePageFlip...");
if (count == 0 && !bugged_about_bug)
{
ERR("Pageflip fail - EBUSY from drmModePageFlip - "
"This is either a kernel bug or an EFL one.");
bugged_about_bug = EINA_TRUE;
}
count++;
if (count > 500)
{