weston/remoting
Antonio Borneo c90fccc256 backend-drm: fix race during system suspend
Depending on system loading, weston-launcher could drop the drm
master access before the compositor and all the clients receive
the notification. In this case, some commit could be sent to the
drm driver too late and get refused with error EACCES.
This error condition is not properly managed and causes weston to
hang.

Change the return type of start_repaint_loop() and repaint_flush()
from void to int, and return 0 on success or -1 if the repaint has
to be cancelled.
In the callers of start_repaint_loop() and repaint_flush() handle
the return value and cancel the repaint when needed.
In backend-drm detect the error EACCES and return -1.
Note: to keep the code cleaner, this change inverts the execution
order between weston_output_schedule_repaint_reset() and
repaint_cancel().

No need to wait for suspend or for any notification; in case the
weston reschedules a repaint, it will get EACCES again.
At resume, damage-all guarantees a complete repaint.

This fix is for atomic modeset only.
Legacy modeset suffers from similar problems, but it is not fixed
by this change. Since drm_pending_state_apply() never returns
error for legacy modeset, this change has no impact on legacy
modeset.

Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/117
2019-07-12 17:16:52 +00:00
..
meson.build build: Fix hint to disable remoting 2019-06-17 11:35:54 -03:00
README doc: Move helper scripts to doc/scripts 2019-06-25 14:05:54 +00:00
remoting-plugin.c backend-drm: fix race during system suspend 2019-07-12 17:16:52 +00:00
remoting-plugin.h remoting: make a gstreamer pipeline configurable 2019-07-09 14:22:25 +00:00

	Remoting plugin for Weston


The Remoting plugin creates a streaming image of a virtual output and transmits
it to a remote host. It is currently only supported on the drm-backend. Virtual
outputs are created and configured by adding a remote-output section to
weston.ini. See man weston-drm(7) for configuration details. This plugin is
loaded automatically if any remote-output sections are present.

This plugin sends motion jpeg images to a client via RTP using gstreamer, and
so requires gstreamer-1.0. This plugin starts sending images immediately when
weston is run, and keeps sending them until weston shuts down. The image stream
can be received by any appropriately configured RTP client, but a sample
gstreamer RTP client script can be found at doc/scripts/remoting-client-receive.bash.

Script usage:
	remoting-client-receive.bash <PORT NUMBER>


How to compile
---------------
Set --enable-remoting=true when configuring weston. The remoting-plugin.so
module is created and installed in the libweston path.


How to configure weston.ini
----------------------------
See man weston-drm(7).