[wayland + ILM] proxy wrappers usage of wayland 1.11.0 to 1.9.0

Philipp Kerling pkerling at casix.org
Fri Aug 18 14:05:10 UTC 2017


Hi,

Am Freitag, den 18.08.2017, 18:35 +0530 schrieb Vikas Patil:
> Dear All,
> 
> 
> I have backported following patches from wayland 1.11.0 to 1.9.0 to
> test one crash issue [1] . I am able to backport and start Weston
> with
> it. Is this valid thing to do?
> 
> 
> https://cgit.freedesktop.org/wayland/wayland/commit/?id=6d29c0da3cd16
> 8e08187cd204d2314188479c0f1
> [client: Introduce proxy wrappers]
> 
> https://cgit.freedesktop.org/wayland/wayland/commit/?id=6fe12f02e3b48
> 79cd3d5faa08f023cc761d13be9
> [client: Fix wl_display_roundtrip_queue() race condition]
> 
> https://cgit.freedesktop.org/wayland/wayland/commit/?id=69ec70fb0d3f7
> 5f4bcce449238d6297f6a986b5f
> [tests/queue-test: Add tests for proxy wrappers] -- not required.
> 
> 
> 
> Now If I understand it correctly I need to use/modify code where the
> wayland client creates the proxy and sets the queue. One such
> components is [2] ILM control library. I tried to do as per the
> patches but with it nothing is coming on display even though weston
> starts successfully with ivi-shell and ivi-controller.so.
> 
> 
> Attached here the modified file. I would like to understand if the
> way I used is correct or not? Could someone explain this fix and How
> to use it properly for ILM control library? Do I need to add similar
> fix in qtwayland  5.5.1 and other such components (e.g. wayland sink
> from gstreamer) ?
I think there are some problems judging by a quick look at your file:
 * You create a wrapper for the wl_display, but then call
   wl_display_get_registry on your original display. You need to use
   the wrapped display here.
 * Consequently, you must set the queue on the wl_display wrapper
   before that so it correctly gets inherited to the wl_registry.
 * I don't understand what you use wl_display_sync for. You do know
   that wl_display_roundtrip_queue uses that implicitly?
 * You must add the registry listener immediately after creating it and
   not dispatch any events (on the queue the registry uses) in between.
   Otherwise they will get lost.

You might want to take a look at how other libraries use the API, e.g.
https://github.com/01org/libva/blob/master/va/wayland/va_wayland_drm.c#L251

If other libraries you use also operate on global objects in a thread-
unsafe way (i.e. they are not using proxy wrappers *and* you cannot
guarantee that the main queue will not be dispatched in parallel) then
you will have to patch them.

Regards
Philipp


> 
> [1] https://lists.freedesktop.org/archives/wayland-devel/2017-August/
> 034784.html
> 
> [2] https://github.com/GENIVI/wayland-ivi-extension/blob/1.9.1/ivi-la
> yermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
> (function: init_control(),  line: 1260 )
> 
> 
> Thanking you in advance for your time and comments.
> 
> 
> 
> Thanks & Regards,
> 
> Vikash
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list