ecore-evas-drm: Check if vblank is supported

Small patch to check if the video driver supports drmWaitVBlank. If
not, we can fall back to timer based animators and avoid freezing (due
to usage of vsync'd animators).

@fix
This commit is contained in:
Christopher Michael 2019-05-22 07:37:36 -04:00
parent ead88ff2ad
commit af70c4ff6d
1 changed files with 11 additions and 0 deletions

View File

@ -1031,6 +1031,17 @@ _ecore_evas_new_internal(const char *device, int x, int y, int w, int h, Eina_Bo
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_evas_drm_engine_func;
ee->engine.data = edata;
if (!ecore_drm2_vblank_supported(edata->dev))
{
ee->engine.func->fn_animator_register = NULL;
ee->engine.func->fn_animator_unregister = NULL;
}
else
{
ee->engine.func->fn_animator_register = _drm_animator_register;
ee->engine.func->fn_animator_unregister = _drm_animator_unregister;
}
/* FIXME */
/* if (edata->device) ee->name = strdup(edata->device); */