summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-09-01 14:49:22 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-09-01 14:50:40 -0500
commit6e30535a3c39efa5ce1662e3f42753dde9c48681 (patch)
tree448fd6c096ffa7d2e303d941ce5a43011037dabe /src/modules
parent8df0576358ac25b7f3d286e6463fe4f052428597 (diff)
wayland_shm: Try a little harder to verify exynos dmabuf capabilities
Turns out the "device_open" function pretty much just tests calloc functionality, and doesn't open any device. So let's allocate a tiny bo and discard it to make sure we're actually on exynos.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index e06b11e..5c9619e 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -269,6 +269,7 @@ _exynos_buffer_manager_setup(int fd)
269{ 269{
270 Eina_Bool fail = EINA_FALSE; 270 Eina_Bool fail = EINA_FALSE;
271 void *drm_exynos_lib; 271 void *drm_exynos_lib;
272 struct exynos_bo *bo;
272 273
273 drm_exynos_lib = dlopen("libdrm_exynos.so", RTLD_LAZY | RTLD_GLOBAL); 274 drm_exynos_lib = dlopen("libdrm_exynos.so", RTLD_LAZY | RTLD_GLOBAL);
274 if (!drm_exynos_lib) return EINA_FALSE; 275 if (!drm_exynos_lib) return EINA_FALSE;
@@ -285,6 +286,12 @@ _exynos_buffer_manager_setup(int fd)
285 buffer_manager->priv = sym_exynos_device_create(fd); 286 buffer_manager->priv = sym_exynos_device_create(fd);
286 if (!buffer_manager->priv) goto err; 287 if (!buffer_manager->priv) goto err;
287 288
289 /* _device_create succeeds on any arch, test harder */
290 bo = sym_exynos_bo_create(buffer_manager->priv, 32, 0);
291 if (!bo) goto err;
292
293 sym_exynos_bo_destroy(bo);
294
288 buffer_manager->alloc = _exynos_alloc; 295 buffer_manager->alloc = _exynos_alloc;
289 buffer_manager->map = _exynos_map; 296 buffer_manager->map = _exynos_map;
290 buffer_manager->unmap = _exynos_unmap; 297 buffer_manager->unmap = _exynos_unmap;