path: root/src/lib/ecore_wl2/ecore_wl2_buffer.c (follow)
AgeCommit message (Collapse)Author
2019-07-22ecore wl2 - fall back to shm if dmabuf fails in buf initCarsten Haitzler (Rasterman)
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
2018-06-19ecore_wl2: Better error handling for dmabuf sync ioctlsDerek Foreman
Summary: Turns out these can fail with EINTR or EAGAIN, and we're supposed to try again. Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision:
2018-06-05ecore_wl2: Fix dmabuf lockingDerek Foreman
Summary: The ioctls weren't properly used so no locking took place at all, leading to rendering anomalies when placing dmabuf buffers in hardware planes. Also, forgetting to check error returns left no indication that the ioctl was failing, so we now emit a warning if the ioctl fails. Reviewers: zmike Reviewed By: zmike Subscribers: devilhorns, cedric, #committers, zmike Tags: #efl Differential Revision:
2018-04-20ecore_wl2: Don't unmap buffers at unlockDerek Foreman
We should be using dmabuf sync ioctls instead of mmap/munmap every draw, this makes that happen. The surface code continues to do what its always done, and map/unlock.
2018-04-20ecore_wl2: Add ERR for buffer lock errorsDerek Foreman
Should never double lock or double unlock, this isn't refcounted, and probably doesn't need to be.
2018-04-20ecore_wl2: Add dma_buf lock/unlock ioctlsDerek Foreman
These should help with coherency later when we don't unmap for every surface post.
2018-04-20ecore_wl2: Add lock/unlock function pointers to buffersDerek Foreman
For backend specific lock/unlock behaviour
2018-04-20ecore_wl2: Add ecore_wl2_buffer_lockDerek Foreman
Currently we're making mapping implicitly take a lock.
2018-02-27ecore_wl2: Disable horizontal resize optimizationDerek Foreman
We had a "clever" optimization that would keep a buffer on resize if it was resizing up horizontal and fit within the previously allocated stride. Unfortunately, there still needs to be a buffer reconfigure between client and compositor that wasn't taking place. Remove this for now.
2018-02-22move from efl.vpath to eina_vpathMarcel Hollerbach
The usages from efl.vpath are moved to to eina_vpath
2018-01-26ecore_wl2: fix ecore_wl2_buffer_wl_buffer_getDerek Foreman
It was currently only used internally and had the side effect of creating a new buffer instead of just returning the existing one. Now it's useful to external callers, as it only returns the existing wl_buffer and has no freaky side effects.
2018-01-26ecore_wl2: Move smarts from surface_map to buffer_mapDerek Foreman
This simplifies the surface code so that it no longer needs access to buffer structure members.
2018-01-26ecore_wl2: Add buffer_fit API and use it from surface codeDerek Foreman
This tries to resize the buffer's useable area to fit the specified size - this is possible if the stride of the buffer is larger than the current width.
2018-01-26ecore_wl2: Add buffer age inc and use it in surface codeDerek Foreman
Technically not necessary, since we could do this with get and set, but it's a little more convenient to the user this way.
2018-01-26ecore_wl2: Add buffer_age_set and use it in surface codeDerek Foreman
2018-01-26ecore_wl2: Add buffer_age_get API and use it in surface codeDerek Foreman
2018-01-26ecore_wl2: Add API for setting buffer busy status and use itDerek Foreman
Since surfaces will be managed by plug-ins, we need to make sure they don't rely on internal structures.
2018-01-26ecore_wl2: Add API for querying buffer lock status and use itDerek Foreman
Since surfaces will be managed by plug-ins, we need to make sure they don't rely on internal structures.
2018-01-19wayland: Reduce number of unneccessary display flushesDerek Foreman
b48781aa6c85c72f620c57cebff96580ddd67899 fixed multiple bugs where the display wasn't flushed correctly, however it was a little overzealous. Some of the flushes were added after calls that only updated internal state, some in internal functions in which the caller was already going to flush, and some were after wayland protocol calls that are double buffered anyway and won't do anything until a following commit. Also, I've removes at least one long standing flush where the recently added flush is in a better location than the original.
2017-12-01wayland_shm: Remove struct _Dmabuf_SurfaceDerek Foreman
It's all piled into Surface now.
2017-11-26ecore-wl2: Fix resource leakChris Michael
Coverity detected a resource leak here because we were not freeing the malloc'd 'obo' variable. Fixes Coverity CID1382907 Signed-off-by: Chris Michael <>
2017-11-21ecore_wl2: Add dmabuf allocations for vc4Derek Foreman
This should theoretically be better for software rendering on rpi3 since it allows the compositor to use our sw rendered buffers as a texture.
2017-11-21ecore_wl2: Fix buffer manager refcountingDerek Foreman
commit 0cf806005e32827f174f42cba27192c47ed9c4a7 correctly fixed a leaked buffer. However, other code was already accounting for the leaked reference to the buffer manager, so an extra deref happened and broke the universe - but only on hardware that no developer has access to for testing.
2017-11-20ecore-wl2: Destroy buffer before we exit the buffer_test functionChris Michael
Small patch to destroy our test buffer before we exit the _ecore_wl2_buffer_test function so that we do not leak here. @fix Signed-off-by: Chris Michael <>
2017-11-17ecore_wl2: Properly handle buffer test failure during buffer_initDerek Foreman
The buffer manager is already cleaned up at this point, don't try to do it again.
2017-11-16ecore_wl2: fix user pointer for dmabuf param listenerDerek Foreman
Proving once again that those that defeat type safety usually get what they deserve.
2017-11-16ecore_wl2: Fix dmabuf test failureDerek Foreman
We need to destroy the buffer manager on fail, since it will exist but only be able to create buffers we can't actually use.
2017-11-16ecore_wl2: Don't try to close drm_fd if we never opened itDerek Foreman
2017-11-15ecore_wl2: Don't open rendernode if we're not going to use itDerek Foreman
We should only open this when actually testing dmabuf. Otherwise we're just wasting time and adding an opportunity to fail shm init over unrelated issues.
2017-11-15ecore_wl2: Reset buffer_manager to NULL on failureDerek Foreman
Calling this multiple times even after it fails the first time is a legit thing now. We'll be doing that when we want to test dmabuf at connection start.
2017-11-15ecore_wl2: Send a dmabuf non-immediate create at startupDerek Foreman
We use immediate mode dmabuf creation at runtime, but this can result in clients being killed with no option to fallback if the buffers can't be consumed by the compositor. This test should catch when a system can allocate a dmabuf buffer and the compositor claims to accept dmabuf, but the buffer can't actually be used for whatever reason. We'll then use wl_shm at runtime instead of dmabuf.
2017-11-15ecore_wl2: factor out part of buffer creationDerek Foreman
So we can use it to make a non-immediate mode buffer test.
2017-11-15ecore_wl2: Filter buffer types by compositor capabilitiesDerek Foreman
It does us no good to be able to allocate dmabuf capable memory if the compositor can't handle it. This should fix failures on systems where allocation is possible but the compositor doesn't advertise dmabuf.
2017-11-15wayland_shm/ecore_wl2: Move buffer allocation into ecore_wl2Derek Foreman
This moves all the platform specific buffer allocation into ecore_wl2 instead of the engine. Note that this makes an internal struct available in the header. This will be removed shortly.