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

Daniel Stone daniel at fooishbar.org
Fri Jan 13 14:21:07 UTC 2017


Hi Jonas,

On 13 January 2017 at 09:05, Jonas Ã…dahl <jadahl at gmail.com> wrote:
> @@ -1876,9 +1878,7 @@ dri2_initialize_wayland_swrast(_EGLDriver *drv, _EGLDisplay *disp)
>     if (dri2_dpy->own_device)
>        wl_display_dispatch_pending(dri2_dpy->wl_dpy);
>
> -   dri2_dpy->wl_registry = wl_display_get_registry(dri2_dpy->wl_dpy);
> -   wl_proxy_set_queue((struct wl_proxy *) dri2_dpy->wl_registry,
> -                      dri2_dpy->wl_queue);
> +   dri2_dpy->wl_registry = wl_display_get_registry(dri2_dpy->wl_dpy_wrapper);
>     wl_registry_add_listener(dri2_dpy->wl_registry,
>                              &registry_listener_swrast, dri2_dpy);

We never actually create the proxy wrapper in dri2_initialize_wayland_swrast. :(

Emil, if you pull the @@ -1159,12 +1156,17 @@ hunk to create the
wl_display proxy wrapper and set the queue into the same position
here, so the two initialisation functions are identical from top to
the first roundtrip() call, plus the equivalent cleanup, this patch
is:
Reviewed-by: Daniel Stone <daniels at collabora.com>

I went through and the rest seemed fine. I would've preferred the
wrapped display to be called wl_dpy and the previous wl_dpy to be
renamed to wl_dpy_unwrapped to make it as difficult as possible to get
this wrong, but having this patch miss the release for that reason
alone seems pretty petty, even for me.

Cheers,
Daniel


More information about the mesa-dev mailing list