diff options
author | Chris Michael <cp.michael@samsung.com> | 2014-01-03 07:39:30 +0000 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2014-01-29 15:27:22 +0000 |
commit | 73a7ac2ec8201123785ec17eff97364f72a474a1 (patch) | |
tree | af2b9adb2ee5a818ecf6d4cd1b47b19a2e3e9734 | |
parent | 5d008992d16d5b2cc5c50b355320645fca4b1fb5 (diff) | |
download | efl-73a7ac2ec8201123785ec17eff97364f72a474a1.tar.gz |
Fix Mesa bug with some drivers by preloading libglapi
Some mesa drivers (i965, etc) require glapi functions but a current
Mesa bug does not always link those drivers to glapi so we will
preload the library to avoid "driver loading" errors.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c index 359f01d2d1..2135cab90e 100644 --- a/src/lib/ecore_drm/ecore_drm_device.c +++ b/src/lib/ecore_drm/ecore_drm_device.c @@ -3,6 +3,7 @@ #endif #include "ecore_drm_private.h" +#include <dlfcn.h> static void _ecore_drm_device_cb_page_flip(int fd, unsigned int frame, unsigned int sec, unsigned int usec, void *data) @@ -262,6 +263,13 @@ ecore_drm_device_open(Ecore_Drm_Device *dev) #ifdef HAVE_GBM if (getenv("ECORE_DRM_HW_ACCEL")) { + /* Typically, gbm loads the dri driver However some versions of Mesa + * do not have libglapi symbols linked in the driver. Because of this, + * using hardware accel for our drm code Could fail with a + * message that the driver could not load. Let's be proactive and + * work around this for the user by preloading the glapi library */ + dlopen("libglapi.so.0", (RTLD_LAZY | RTLD_GLOBAL)); + if ((dev->gbm = gbm_create_device(dev->drm.fd))) { dev->use_hw_accel = EINA_TRUE; |