ecore_x_vsync: hack to workaround bug in vboxvideo

there is a kernel oops when using vboxvideo 4.3.14 and one calls
drmWaitVBlank(), then do not init drm when using such driver.

    https://www.virtualbox.org/ticket/13265
This commit is contained in:
Gustavo Sverzut Barbieri 2014-08-07 11:29:52 -03:00
parent 99888ceaec
commit a306c19871
1 changed files with 19 additions and 0 deletions

View File

@ -323,6 +323,25 @@ _drm_init(void)
struct stat st;
char buf[512];
// vboxvideo 4.3.14 is crashing when calls drmWaitVBlank()
// https://www.virtualbox.org/ticket/13265
if (stat("/sys/module/vboxvideo", &st) == 0)
{
FILE *fp = fopen("/sys/module/vboxvideo/version", "r");
if (fp)
{
if (fgets(buf, sizeof(buf), fp))
{
if (eina_str_has_prefix(buf, "4.3.14"))
{
fclose(fp);
return 0;
}
}
fclose(fp);
}
}
snprintf(buf, sizeof(buf), "/dev/dri/card1");
if (stat(buf, &st) == 0)
{