barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a306c19871f8a44bda0008d760567aa6cae2bca2

commit a306c19871f8a44bda0008d760567aa6cae2bca2
Author: Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
Date:   Thu Aug 7 11:29:52 2014 -0300

    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
---
 src/lib/ecore_x/xlib/ecore_x_vsync.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/lib/ecore_x/xlib/ecore_x_vsync.c 
b/src/lib/ecore_x/xlib/ecore_x_vsync.c
index e8f2824..e3b1140 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)
      {

-- 


Reply via email to