diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-22 00:36:07 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2019-07-22 00:36:07 +0100 |
commit | de5eea226a705b908154e5b518c659d3917631c3 (patch) | |
tree | 204b4e355ffb6c73501c80b1392f89c5a5604451 | |
parent | 3195cf6d5f8d3548c9d194fba3aed07c69e8551c (diff) | |
download | efl-de5eea226a705b908154e5b518c659d3917631c3.tar.gz |
ecore wl2 - fall back to shm if dmabuf fails in buf init
so even if shm was an allowed mode/flag, we never fell back to shm if
dmabufs were not possible (/dev/dri/renderD128 didn't exist or wansn't
open-able). that's decidedly a bad thing to do.
@fix
-rw-r--r-- | src/lib/ecore_wl2/ecore_wl2_buffer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_buffer.c b/src/lib/ecore_wl2/ecore_wl2_buffer.c index 8e2e164546..faa811a447 100644 --- a/src/lib/ecore_wl2/ecore_wl2_buffer.c +++ b/src/lib/ecore_wl2/ecore_wl2_buffer.c @@ -595,12 +595,17 @@ ecore_wl2_buffer_init(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer_Type types) if (!getenv("EVAS_WAYLAND_SHM_DISABLE_DMABUF") && dmabuf) { fd = open("/dev/dri/renderD128", O_RDWR | O_CLOEXEC); - if (fd < 0) goto err_drm; + if (fd < 0) + { + ERR("Tried to use dmabufs, but can't find /dev/dri/renderD128 . Falling back to regular SHM"); + goto fallback_shm; + } success = _intel_buffer_manager_setup(fd); if (!success) success = _exynos_buffer_manager_setup(fd); if (!success) success = _vc4_buffer_manager_setup(fd); } +fallback_shm: if (!success) success = shm && _wl_shm_buffer_manager_setup(0); if (!success) goto err_bm; @@ -610,7 +615,6 @@ ecore_wl2_buffer_init(Ecore_Wl2_Display *ewd, Ecore_Wl2_Buffer_Type types) err_bm: if (fd >= 0) close(fd); -err_drm: free(buffer_manager); buffer_manager = NULL; err_alloc: |