[wayland + ILM] proxy wrappers usage of wayland 1.11.0 to 1.9.0
pkerling at casix.org
Fri Aug 18 10:05:10 EDT 2017
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  . I am able to backport and start Weston
> it. Is this valid thing to do?
> [client: Introduce proxy wrappers]
> [client: Fix wl_display_roundtrip_queue() race condition]
> [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  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.
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.
>  https://lists.freedesktop.org/archives/wayland-devel/2017-August/
>  https://github.com/GENIVI/wayland-ivi-extension/blob/1.9.1/ivi-la
> (function: init_control(), line: 1260 )
> Thanking you in advance for your time and comments.
> Thanks & Regards,
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
More information about the genivi-ivi-layer-management