ecore_drm: Test drm device for DUMB BUFFER capability
authorStefan Schmidt <s.schmidt@samsung.com>
Fri, 27 Jun 2014 13:30:35 +0000 (15:30 +0200)
committerStefan Schmidt <s.schmidt@samsung.com>
Mon, 30 Jun 2014 08:13:43 +0000 (10:13 +0200)
Without this we can't do software rendering on the DRM device.

src/lib/ecore_drm/ecore_drm_device.c

index a352453..daa744b 100644 (file)
@@ -350,7 +350,15 @@ ecore_drm_device_open(Ecore_Drm_Device *dev)
      }
    else
      {
-        ERR("Could not get device capabilities: %m");
+        ERR("Could not get TIMESTAMP_MONOTONIC device capabilities: %m");
+     }
+
+   /* Without DUMB_BUFFER we can't do software rendering on DRM. Fail without it
+    * until we have rock solid hardware accelerated DRM on all drivers */
+   if (drmGetCap(dev->drm.fd, DRM_CAP_DUMB_BUFFER, &caps) < 0 || !caps)
+     {
+        ERR("Could not get DUMB_BUFFER device capabilities: %m");
+        return EINA_FALSE;
      }
 
 /* #ifdef HAVE_GBM */