Re: [Mesa-dev] Plumbing explicit synchronization through the Linux ecosystem

2020-03-17 Thread Jonas Ådahl
On Mon, Mar 16, 2020 at 10:37:04PM -0500, Jason Ekstrand wrote: > On Mon, Mar 16, 2020 at 6:39 PM Roman Gilg wrote: > > > > On Wed, Mar 11, 2020 at 8:21 PM Jason Ekstrand wrote: > > > > > > On Wed, Mar 11, 2020 at 12:31 PM Jason Ekstrand > > > wrote: > > > > > > > > All, > > > > > > > > Sorry f

[Mesa-dev] [PATCH v4 1/2] egl/wayland: Cleanup private display connection when init fails

2017-01-13 Thread Jonas Ådahl
When failing to initializing the Wayland EGL driver, don't leak the display server connection if it was us who created it. Signed-off-by: Jonas Ådahl Cc: mesa-sta...@lists.freedesktop.org --- Changes since v3: * Also disconnect in the swrast initializer error path. * Changed condition

[Mesa-dev] [PATCH v4 2/2] egl/wayland: Avoid race conditions when on non-main thread

2017-01-13 Thread Jonas Ådahl
performing round trips (via wl_display_sync()) and retrieving the global objects (via wl_display_get_registry()), the mentioned race condition is avoided. Signed-off-by: Jonas Ådahl Cc: mesa-sta...@lists.freedesktop.org --- Changes since v3: * Do the same for swrast as was done for drm

[Mesa-dev] [PATCH v3 2/2] egl/wayland: Cleanup private display connection when init fails

2017-01-13 Thread Jonas Ådahl
When failing to initializing the Wayland EGL driver, don't leak the display server connection if it was us who created it. Signed-off-by: Jonas Ådahl --- Changes since v2 (where it was part of PATCH 1/2): * Fixed use-after-free src/egl/drivers/dri2/platform_wayland.c | 2 ++ 1 file ch

[Mesa-dev] [PATCH v3 1/2] egl/wayland: Avoid race conditions when on non-main thread

2017-01-13 Thread Jonas Ådahl
performing round trips (via wl_display_sync()) and retrieving the global objects (via wl_display_get_registry()), the mentioned race condition is avoided. Signed-off-by: Jonas Ådahl --- Changes since v2: * Split out the display connection into a separate patch. configure.ac

Re: [Mesa-dev] [PATCH] Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"

2016-11-20 Thread Jonas Ådahl
On Thu, Nov 10, 2016 at 10:38:51AM +, Daniel Stone wrote: > Hi, > > On 10 November 2016 at 06:08, Jonas Ådahl wrote: > > On Mon, Oct 24, 2016 at 08:42:59PM +0100, Daniel Stone wrote: > >> The intent of moving blocking from SwapBuffers to get_back_bo, was to >

Re: [Mesa-dev] [PATCH] Revert "wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers"

2016-11-09 Thread Jonas Ådahl
e redraw. > > Revert to the previous behaviour of allowing rendering to begin but > delaying SwapBuffers, unless and until we can find a more gentle > behaviour. > > Signed-off-by: Daniel Stone > Cc: Neil Roberts > Cc: Kristian Høgsberg The explanations sounds sane to me,

[Mesa-dev] [PATCH v2] egl/wayland: Avoid race conditions when on non-main thread

2016-06-23 Thread Jonas Ådahl
performing round trips (via wl_display_sync()) and retrieving the global objects (via wl_display_get_registry()), the mentioned race condition is avoided. Signed-off-by: Jonas Ådahl --- Changes since v1: - Added proxy clean up on tear down - Changed required version to the stable wayland

[Mesa-dev] [PATCH] egl/wayland: Avoid race conditions when on non-main thread

2016-05-04 Thread Jonas Ådahl
performing round trips (via wl_display_sync()) and retrieving the global objects (via wl_display_get_registry()), the mentioned race condition is avoided. Signed-off-by: Jonas Ådahl --- Note that this patch adds a dependency on theh alpha release on wayland 1.11. Jonas configure.ac

Re: [Mesa-dev] [PATCH] wayland: Don't race when releasing named buffers

2013-10-23 Thread Jonas Ådahl
Still needs review. On Wed, Oct 2, 2013 at 5:06 PM, Jonas Ådahl wrote: > This patch fixes a race when a client releases a named buffer before the > server had the time to handle 'wl_drm_create_buffer'. When triggered, > the server would fail to create the buffer since the clie

[Mesa-dev] [PATCH] wayland: Don't race when releasing named buffers

2013-10-02 Thread Jonas Ådahl
error. To solve this, use a lazy non-blocking roundtrip when creating the buffer that will only potentially block when releasing if the roundtrip callback was not already invoked. Signed-off-by: Jonas Ådahl --- src/egl/drivers/dri2/egl_dri2.h | 1 + src/egl/drivers/dri2/platform_wayl

Re: [Mesa-dev] [PATCH mesa] wayland: Disable prime support on buggy kernels

2013-05-08 Thread Jonas Ådahl
On Tue, Apr 23, 2013 at 3:54 PM, Ander Conselvan de Oliveira wrote: > Linux kernel 3.8 shipped with a bug in the prime fd passing code that > makes it unreliable. As of this writing, it seems unlikely that 3.9 > will contain the fix for the issue. > > This patch disable prime support when running

[Mesa-dev] [PATCH] wayland: Don't cancel a roundtrip when any event is received

2012-12-25 Thread Jonas Ådahl
Since wl_display_dispatch_queue() returns the number of processed events or -1 on error, only cancel the roundtrip if an -1 is returned. This also fixes a potential memory corruption bug happening when the roundtrip does an early return and the callback later writes to the then out of scope stack

[Mesa-dev] [PATCH v2] wayland: Destroy frame callback when destroying surface

2012-10-28 Thread Jonas Ådahl
If a frame callback is not destroyed when destroying a surface, its handler function will be invoked if the surface was destoryed after the callback was requested but before it was invoked, causing a write on free:ed memory. This can happen if eglDestroySurface() is called shortly after eglSwapBuf

[Mesa-dev] [PATCH] wayland: Destroy frame callback when destroying surface

2012-10-27 Thread Jonas Ådahl
If a frame callback is not destroyed when destroying a surface, its handler function will be invoked if the surface was destroyed after the callback was requested but before it was invoked, causing a write on free:ed memory. This can happen if eglDestroySurface() is called shortly after eglSwapBuf