aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_x/xlib/ecore_x_vsync.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2014-08-07 11:29:52 -0300
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2014-08-07 11:31:36 -0300
commita306c19871f8a44bda0008d760567aa6cae2bca2 (patch)
tree7b0fc00935b78b82e9ee8f7141e95ef8bac9f3c7 /src/lib/ecore_x/xlib/ecore_x_vsync.c
parentEolian/Generator: fix generation of class functions. (diff)
downloadefl-a306c19871f8a44bda0008d760567aa6cae2bca2.tar.gz
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
Diffstat (limited to 'src/lib/ecore_x/xlib/ecore_x_vsync.c')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_vsync.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_vsync.c b/src/lib/ecore_x/xlib/ecore_x_vsync.c
index e8f2824f31..e3b1140f84 100644
--- a/src/lib/ecore_x/xlib/ecore_x_vsync.c
+++ b/src/lib/ecore_x/xlib/ecore_x_vsync.c
@@ -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)
{