platform/upstream/weston.git
5 years agocompositor: Add debug key-binding to display/dump flight recorder contents
Marius Vlad [Thu, 27 Jun 2019 16:19:26 +0000 (19:19 +0300)]
compositor: Add debug key-binding to display/dump flight recorder contents

Uses (debug key-binding mod+shift+space) KEY_D to display/dump
the contents of the flight recorder.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Put back weston_compositor_add_debug_binding() as public
Marius Vlad [Thu, 18 Jul 2019 08:01:51 +0000 (11:01 +0300)]
libweston: Put back weston_compositor_add_debug_binding() as public

The ability to install debug keybinds is useful so bring it back to the
public libweston API.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor: Plug-in the flight recorder
Marius Vlad [Mon, 24 Jun 2019 10:27:44 +0000 (13:27 +0300)]
compositor: Plug-in the flight recorder

Create a flight recorder subscriber and allow subscribring to scopes
over the command line.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log-flight-rec: Introduce flight recorder stream
Marius Vlad [Sun, 23 Jun 2019 20:24:34 +0000 (23:24 +0300)]
weston-log-flight-rec: Introduce flight recorder stream

Like a black box in an airplane, the flight recorder can be used to
accumulate data and, when needed, to display its contents.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log: Remove weston_log() calls from weston-log
Marius Vlad [Sun, 23 Jun 2019 12:48:54 +0000 (15:48 +0300)]
weston-log: Remove weston_log() calls from weston-log

Avoids a potential dependency on the log scope being set-up before
actually creating the scope. Destroy part of the log context could
suffer from the same issue if the log scope is destroyed before.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor: Create the 'log' scope much earlier
Marius Vlad [Wed, 3 Jul 2019 09:41:47 +0000 (12:41 +0300)]
compositor: Create the 'log' scope much earlier

Logging should start as early as possible so create the log scope as
early as possible, before subscribing to it.

Open the logfile before creating the 'logger' subscriber, making sure
we're logging to the file properly.

Also migrate `weston_log_set_handler()` to avoid potential calls to
`weston_log` before installing the log handler.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor: Destroy the compositor before the log scope
Marius Vlad [Mon, 24 Jun 2019 09:00:47 +0000 (12:00 +0300)]
compositor: Destroy the compositor before the log scope

Destroying the compositor after destroying the log scope will not print
out the messages in the tear down/clean-up phase of the compositor, so
add a new tear_down function which allows keeping a valid reference to
the compositor. This way we can destroy the compositor before destroying
the scope and keep the debug messages.

While at it remove the log context destroy part from the clean-up
of the compositor and make it stand on its own.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor: Plug-in the file stream
Marius Vlad [Sat, 22 Jun 2019 20:39:19 +0000 (23:39 +0300)]
compositor: Plug-in the file stream

Pass log scopes from the command line to subscribe log scopes
dynamically to the 'logger' subscriber.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log-file: Introduce file type of stream
Marius Vlad [Sat, 22 Jun 2019 17:12:24 +0000 (20:12 +0300)]
weston-log-file: Introduce file type of stream

With the logging infrastructure in place this patch add a new user: file
type of stream backed-up by a std file descriptor.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log: Rename scope's 'begin_cb' callback to 'new_subscriber'
Marius Vlad [Wed, 17 Jul 2019 12:43:53 +0000 (15:43 +0300)]
weston-log: Rename scope's 'begin_cb' callback to 'new_subscriber'

Rather than using 'begin_cb' rename it to a more suitable name.

Further more instead of using the scope use the subscription to pass as
an argument. The source scope is attached to the subscription when
creating it so we can access it that way.

This also adds a _complete and a _printf method for the subscription
such that the callbacks can use to write data to only _that_
subscription and to close/complete it, otherwise writing to a scope
results in writing to all subscriptions for that scope which is not
correct.

In the same time, the scope counter-parts of _write and _complete will
now use the subscription function as well.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniels@collabora.com>
5 years agoweston-log/weston-log-wayland: Inline private subscription functions
Marius Vlad [Thu, 11 Jul 2019 14:44:50 +0000 (17:44 +0300)]
weston-log/weston-log-wayland: Inline private subscription functions

This avoids duplicated bits, by calling the scopes's callback (if any)
and adding the subscription to the scope's subscription list. Further
more, the scope's name when creating the subscription is not needed so
removed that as well.

In mirror, also inline removing of subscription for scope's subscription
list. Fix a potential corner case when the user can request a
subscription to an invalid scope in stream_destroy().

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log: Introduce subscribe functionality
Marius Vlad [Fri, 21 Jun 2019 21:29:31 +0000 (00:29 +0300)]
weston-log: Introduce subscribe functionality

As described in e10c9f89826bb: "weston-debug: Introduce...", the
subscriber object need further functionality to make use of it.

Current form of the weston-debug protocol would not need this, as it
creates underneath a new subscriber each time a client connects and
subscriptions are created/destroyed automatically with the help of
wayland protocol. For other types of streams, we require to manually
create a subscriber and to subscribe to log scopes.

This patch introduces the ability to create subscriptions, and
implicitly to subscribe to (previously created) scopes.

In the event the scope(s) are not created we temporary store the
subscription as a pending one: a subscription for which a scope doesn't
exist at the time of the subscription. When the scope for which the
subscription has been created we take care to create the subscription as
well.

While at it the documentation bits are modified accommodate the subscribe
method and its further functionality.

Lastly, it removes an unlikely case when a scope is not created so we
avoid any kind of dandling (pending) subscription in case there is
subscription to it. We can only do something about in the destroy part
of the scope.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agoweston-debug: Rename weston-debug to weston-log to better reflect its purpose
Marius Vlad [Fri, 21 Jun 2019 19:49:18 +0000 (22:49 +0300)]
weston-debug: Rename weston-debug to weston-log to better reflect its purpose

No changes in functionality have been made.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-log-wayland: Rename weston_debug_stream to weston_log_wayland
Marius Vlad [Fri, 21 Jun 2019 18:13:15 +0000 (21:13 +0300)]
weston-log-wayland: Rename weston_debug_stream to weston_log_wayland

No changes in functionality have been made.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-debug: Migrate weston_debug_stream to weston_log_wayland file
Marius Vlad [Tue, 25 Jun 2019 10:29:57 +0000 (13:29 +0300)]
weston-debug: Migrate weston_debug_stream to weston_log_wayland file

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-debug: Make it easier to separate weston_debug_stream
Marius Vlad [Fri, 21 Jun 2019 11:57:02 +0000 (14:57 +0300)]
weston-debug: Make it easier to separate weston_debug_stream

This way we can split easier weston_debug_stream into a separate file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoweston-debug: Convert weston_debug_stream to use the subscriber base class
Marius Vlad [Fri, 21 Jun 2019 11:20:15 +0000 (14:20 +0300)]
weston-debug: Convert weston_debug_stream to use the subscriber base class

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agoweston-debug: Introduce weston_log_subscription and weston_log_subscriber objects
Marius Vlad [Tue, 25 Jun 2019 09:48:56 +0000 (12:48 +0300)]
weston-debug: Introduce weston_log_subscription and weston_log_subscriber objects

Adds a minimalistic API for managing the subscription object. The
subscribe functionality will be brought in once we re-organize a bit
weston-debug-stream and split it properly. It extends the logging
context with a linked list of potential subscription and adds a linked
list of subscriptions in the log scope.

This patch represents the start of a logging framework for weston. It's
being built around weston-debug, with the intent to superseded it, and
make weston-debug a client of the framework. Further more the logging
framework should replace current logging handler and allow other types
of streams to be used.

Currently present in libweston under weston-debug we have log scopes, debug
streams and a logging context.

With this patch, two (internal) objects are being added: the concept of
a subscriber and the concept of subscription.  The subscription object
is a ephemeral object, implicitly managed which is created each time one
would want to a subscribe to a scope. The scope will maintain a list of
subscriptions and will continue to be explicitly managed.

The streams will use the subscriber object as a base class to extend
upon. By doing so it allows to customize the stream with specific
functions that manipulate the underlaying storage. The subscriber object
will require a subscribe function and specific stream functions and like
the scope, will be explicitly managed.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agolibweston: Move 'struct weston_backend' to the internal backend header
Pekka Paalanen [Tue, 16 Jul 2019 21:09:06 +0000 (00:09 +0300)]
libweston: Move 'struct weston_backend' to the internal backend header

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_seat'
Marius Vlad [Tue, 16 Jul 2019 20:44:21 +0000 (23:44 +0300)]
libweston: Migrate functions that operate on 'weston_seat'

All 'notify_()*' belong in the private backend header file.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_output' into backend header
Marius Vlad [Tue, 16 Jul 2019 20:34:14 +0000 (23:34 +0300)]
libweston: Migrate functions that operate on 'weston_output' into backend header

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Introduce backend.h
Marius Vlad [Tue, 16 Jul 2019 20:11:25 +0000 (23:11 +0300)]
libweston: Introduce backend.h

Introduce a new private header file that only internal backends are
allowed to use. Starts by migrating functions that operate on the
'struct weston_head'.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate what is left out the libweston public header
Marius Vlad [Thu, 11 Jul 2019 11:54:46 +0000 (14:54 +0300)]
libweston: Migrate what is left out the libweston public header

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate content_protection from public header
Marius Vlad [Wed, 10 Jul 2019 18:31:20 +0000 (21:31 +0300)]
libweston: Migrate content_protection from public header

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that perform various transformations
Marius Vlad [Wed, 10 Jul 2019 18:27:49 +0000 (21:27 +0300)]
libweston: Migrate functions that perform various transformations

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_view'
Marius Vlad [Wed, 10 Jul 2019 18:06:15 +0000 (21:06 +0300)]
libweston: Migrate functions that operate on 'weston_view'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_spring'
Marius Vlad [Wed, 10 Jul 2019 17:56:04 +0000 (20:56 +0300)]
libweston: Migrate functions that operate on 'weston_spring'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_surface'
Marius Vlad [Wed, 10 Jul 2019 17:42:45 +0000 (20:42 +0300)]
libweston: Migrate functions that operate on 'weston_surface'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on input objects
Marius Vlad [Wed, 10 Jul 2019 15:23:43 +0000 (18:23 +0300)]
libweston: Migrate functions that operate on input objects

This include 'weston_keyboard', 'weston_touch', 'weston_pointer' and
other released classes.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_seat'
Marius Vlad [Wed, 10 Jul 2019 14:32:42 +0000 (17:32 +0300)]
libweston: Migrate functions that operate on 'weston_seat'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_plane'
Marius Vlad [Wed, 10 Jul 2019 13:29:05 +0000 (16:29 +0300)]
libweston: Migrate functions that operate on 'weston_plane'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate functions that operate on 'weston_compositor'
Marius Vlad [Wed, 10 Jul 2019 11:48:39 +0000 (14:48 +0300)]
libweston: Migrate functions that operate on 'weston_compositor'

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Introduce libweston-internal.h
Marius Vlad [Wed, 10 Jul 2019 10:46:39 +0000 (13:46 +0300)]
libweston: Introduce libweston-internal.h

Introduce a new private header file that only internal parts of the
library are allowed to use and shouldn't be exposed in the public header
of libweston.

Start by adding by adding functions that operate on the 'weston_buffer*'.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Removed unused tty_* functions
Marius Vlad [Wed, 3 Jul 2019 17:12:46 +0000 (20:12 +0300)]
libweston: Removed unused tty_* functions

These are nowhere defined, so it seems the we're only left with these
declarations.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Migrate weston_environment_get_fd() to weston-launch header
Marius Vlad [Tue, 9 Jul 2019 13:31:35 +0000 (16:31 +0300)]
libweston: Migrate weston_environment_get_fd() to weston-launch header

This is private so it doesn't belong to public libweston API header.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: do not include config-parser.h
Pekka Paalanen [Thu, 18 Apr 2019 10:54:38 +0000 (13:54 +0300)]
libweston: do not include config-parser.h

config-parser.h is a helper API that libweston core must never depend on. Using
it is a compositor frontend decision.

Including it in libweston.h would give the wrong message.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agobackend-drm: dont emit sesion signal if already at same state
Robert Beckett [Tue, 2 Jul 2019 15:31:22 +0000 (16:31 +0100)]
backend-drm: dont emit sesion signal if already at same state

logind will send a device changed at start of day, prompting a session
active change, but the session will already be active from compositor
creation.

Avoid unnecessary signal emition and drm state invalidation.

The logind launcher sets the session active when the graphics device is
assigned to weston from systemd. Unfortunately 8d23ab78 didnt check whether the
session was already active before setting it active and emitting the session
active signal.
The handler for that signal then proceeds to invalidate the entire graphics
state, causing the next redraw to reconfigure all outputs (to the same routing
as they were already).
This then massively increases the likelihood of trying to configure a crtc that
has a commit already in flight.

Add the old behaviour of only emitting a signal on a changed state.
This avoids the issue for now by reducing the chances of a clash. Future
work will need to fix the issue properly (better handling of state_invalid e.g.
wait for quiescence, better monitoring for crtc usage clashes etc).

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
5 years agolibweston: make session_active a bool
Robert Beckett [Wed, 10 Jul 2019 15:40:12 +0000 (16:40 +0100)]
libweston: make session_active a bool

compositor->session_active should be a bool as it tracks a boolean
condition.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
5 years agocontributing: add copy of DCO
Pekka Paalanen [Mon, 4 Feb 2019 11:17:28 +0000 (13:17 +0200)]
contributing: add copy of DCO

The DCO was fetched from https://developercertificate.org/ on Feb 4, 2019.
DCO-1.1.txt is a verbatim copy of it.

We should carry a copy of this legal document to be explicit on what wording we
refer to. A link to the URL is not enough, because it may go stale or change
contents without notice.

This clarifies on what the S-o-b actually means. The meaning itself is the same
as before.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5 years agobackend-drm: fix race during system suspend
Antonio Borneo [Sun, 30 Jun 2019 13:51:10 +0000 (15:51 +0200)]
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
5 years agogl-renderer: Don't leak transformed region
Daniel Stone [Tue, 2 Jul 2019 10:52:09 +0000 (11:52 +0100)]
gl-renderer: Don't leak transformed region

Unfortunately, our y_invert helper also forgot to free the region it
transformed to. Clean up our allocation before we exit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Account for offset in output region translation
Daniel Stone [Mon, 1 Jul 2019 16:44:20 +0000 (17:44 +0100)]
gl-renderer: Account for offset in output region translation

In 55bcb93fefd6 ("gl-renderer: Use helper for conversion to EGL rects"),
we extracted and lovingly commented the transformation from global to
output co-ordinate space used for EGL_KHR_swap_buffer_with_damage, into
a new helper function.

The commenting correctly noted the steps we need to perform the
transformation: shifting by the output's offset into global space,
followed by applying the output's scale and rotation transformations.

Unfortunately, the code did not live up to the high standards of the
comment, and forgot to translate by the output's offset. This meant that
for multiple outputs, we would probably end up with wildly out-of-bounds
co-ordinates.

Fix the code to first translate by the output's offset in global space,
ensuring that both our swap_buffers_with_damage, and our partial_update
co-ordinate sets, can spark joy for those blessed with more than one
output.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agoremoting: make a gstreamer pipeline configurable
Tomohito Esaki [Wed, 22 May 2019 03:21:32 +0000 (12:21 +0900)]
remoting: make a gstreamer pipeline configurable

Allow a gstreamer pipeline to be configurable via an weston.ini. It is
necessary that source is appsrc, its name is "src", and sink name is
"sink" in pipeline. Also, remoting plugin ignore port and host
configuration if the gst-pipeline is specified.

5 years agobackend-drm: get handle in gbm specific code
Stefan Agner [Sun, 7 Jul 2019 22:42:05 +0000 (00:42 +0200)]
backend-drm: get handle in gbm specific code

Get GBM BO handle in GBM specific code. This allows to compile
drm_output_set_cursor without GBM.

Signed-off-by: Stefan Agner <stefan@agner.ch>
5 years agobackend-drm: drop gbm.h from c files
Stefan Agner [Sun, 7 Jul 2019 22:35:06 +0000 (00:35 +0200)]
backend-drm: drop gbm.h from c files

The header file is anyway included in drm-internal.h, we can safely
drop it from the c files.

Signed-off-by: Stefan Agner <stefan@agner.ch>
5 years agocompositor-drm: use DRM constants
Stefan Agner [Sun, 7 Jul 2019 22:30:44 +0000 (00:30 +0200)]
compositor-drm: use DRM constants

The GBM and DRM constants have the same meaning. In preparation
to make the DRM backend compile without libgbm, prefer the DRM
constants where GBM is not needed.

Signed-off-by: Stefan Agner <stefan@agner.ch>
5 years agoclients: Add content-protection client app
Ankit Nautiyal [Tue, 8 Jan 2019 12:15:35 +0000 (17:45 +0530)]
clients: Add content-protection client app

This patch adds a client app which can be used to show the
implementation of weston content-protection protocol. The app can
request for Type-0 and Type-1 content or request for disabling
content-protection to the content-protection server.
It listens for the content-protection status change event from the
server and accordingly display the required content.

The content Type-0, Type-1 and unprotected contents are prepared
using cairo surface, with different color and text to distinguish
between the contents.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agogl-renderer: Obscure protected content on unprotected display
Harish Krupo [Fri, 7 Jun 2019 05:39:56 +0000 (11:09 +0530)]
gl-renderer: Obscure protected content on unprotected display

The content protection protocol requires that in enforced mode, parts of the
surfaces which lie on outputs with protection level lower than that of the surface
be censored. This patch uses a solid shader to color such regions with
dark red.

Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
5 years agocompositor: Enable HDCP for an output using weston.ini
Ankit Nautiyal [Wed, 3 Apr 2019 04:44:59 +0000 (10:14 +0530)]
compositor: Enable HDCP for an output using weston.ini

This patch enables a user to opt for HDCP per output, by writing into
the output section of weston.ini configuration file. HDCP is always
enabled by default for the outputs.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agolibweston: Notify client for change in content-protection status
Ankit Nautiyal [Wed, 3 Apr 2019 13:51:58 +0000 (19:21 +0530)]
libweston: Notify client for change in content-protection status

The change in an output's content-protection may trigger a change in
the surface's content-protection status, and inturn the
content-protection available for the client.

This patch recomputes the content-protection level for a surface,
in case there is a change in content-protection level of an output,
showing the surface. In case of a change in the surface's
content-protection, the client associated with that surface is
notified.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agolibweston: Add content-protection protocol implementation
Ankit Nautiyal [Thu, 28 Mar 2019 09:35:42 +0000 (15:05 +0530)]
libweston: Add content-protection protocol implementation

This patch adds the content-protection protocol implementation, to
enable a weston client application to request for content-protection
for its content via HDCP.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agolibweston: Add support to set content-protection for a weston_surface
Ankit Nautiyal [Tue, 26 Mar 2019 08:07:12 +0000 (13:37 +0530)]
libweston: Add support to set content-protection for a weston_surface

The protection requested for a given surface, must reach through the
weston_surface::pending_state, in the commit-cycle for the
weston_surface, so that it gets updated in the next commit.

As some protection is requested for a given weston_surface, it means
protection must be set for each of the outputs which show the surface.

While setting the protection of a weston_output, care must be taken
so as to avoid, degrading the protection of another surfaces, enjoying
the protection. For this purpose, all the weston_surfaces that are
shown on a weston_output are checked for their desired protection.
The highest of all such desired protections must be set for the
weston_output to avoid degrading of existing protected surfaces.
A surface requesting protection for a lower content-type can still be
provided protection for a higher type but the converse cannot be
allowed.

This patch adds support to set content-protection for a suface, which
inturn sets the content-protection for each of the outputs on which
it is shown, provided, none of the existing surface's protection
request is downgraded.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agolibweston: Compute current protection for weston_output and weston_head
Ankit Nautiyal [Wed, 3 Apr 2019 13:14:35 +0000 (18:44 +0530)]
libweston: Compute current protection for weston_output and weston_head

The actual protection status for a given weston_head depends upon the
corresponding drm_head's connector HDCP properties. On the other hand,
the actual protection for a weston_output is the minimum of the
protection status of its attached heads.
As a head's protection changes, the current protection of the output
to which the head is attached is recomputed.

This patch adds the support to keep track of the current
content-protection for heads and the outputs.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agolibweston: Add support to set content-protection for a weston_output
Ankit Nautiyal [Mon, 25 Mar 2019 12:27:59 +0000 (17:57 +0530)]
libweston: Add support to set content-protection for a weston_output

For making an output secure, the content-protection should be set for
each of head attached to that output. So whenever the protection for
a weston_output is desired, it means that protection is desired for
each of the weston_head attached to that weston_output.

This patch introduces a new enum in libweston to represent the
requested/current protection statuses, equivalent to the type enum
defined by the weston-secure-output protocol. The new enum helps to
extend the content-protection status and requests to libweston and
the backends.
This patch also adds a new member desired_protection to store the
desired protection for an output in weston_output.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
5 years agoprotocol: Add content-protection protocol
Scott Anderson [Mon, 4 Feb 2019 08:34:56 +0000 (21:34 +1300)]
protocol: Add content-protection protocol

This protocol allows a client to ask the compositor to only allow it to
be displayed on a "secure" output. This initial version of the protocol
supports HDCP.

This is loosely based on the chromium secure-output protocol [1].

This protocol is mostly useful for closed system, where the client can
trust the compositor, such as set-top boxes. This is not a way to
implement any kind of Digital Rights Management on desktops. The
compositor would be free to lie to the client, anyway.

Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
[1]
https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml

5 years agoivi-layout: unmap desktop surfaces in ivi_view_destroy()
Michael Olbrich [Wed, 26 Jun 2019 05:47:50 +0000 (07:47 +0200)]
ivi-layout: unmap desktop surfaces in ivi_view_destroy()

weston_desktop_surface_unlink_view() does now call weston_view_destroy() so the
weston_view is not destroyed here. This is a problem because the view remains in
the weston_layer view_list. If ivi_view_destroy() is called from
ivi_layout_surface_destroy() and the view list is rebuilt in the 'removed'
signal, then the list gets corrupted when the view is destroyed immediately
afterwards.
Fix this by calling weston_view_destroy() unconditionally for all view.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
5 years agoivi-layout: use libweston-desktop api is to send configure events everywhere
Michael Olbrich [Wed, 26 Jun 2019 06:00:43 +0000 (08:00 +0200)]
ivi-layout: use libweston-desktop api is to send configure events everywhere

Whenever shell_surface_send_configure() is called
weston_desktop_surface_set_size() should be used instead for desktop
surfaces. It is already done for IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY, do
it everywhere else too.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
5 years agodoc/sphinx: No need for doxygen custom target
Marius Vlad [Mon, 1 Jul 2019 08:16:17 +0000 (11:16 +0300)]
doc/sphinx: No need for doxygen custom target

Unfortunate left over which was not removed once we had the script in
place to regenerate the documentation. A side-effect was the fact that
we still ran the script even if 'docs' target was called, effectively
nullifying the fact that 'docs' target was ran at all. For instance,
'install' would've been executing the script even if 'docs' target
was called before.

This removes the doxygen_target entirely and the depends of sphinx
target on it, makes building and installing docs a bit faster.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor: Support xdg_output_unstable_v1
Roman Gilg [Fri, 29 Mar 2019 12:01:06 +0000 (13:01 +0100)]
compositor: Support xdg_output_unstable_v1

The xdg-output resources are listed in each head struct. They become idle when
the respective weston_output has been removed again. The client is supposed to
destroy them explicitly afterwards.

After starting an XWayland client xrandr displays the logical size as expected.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
5 years agobackend-drm: make linear modifier to default
Tomohito Esaki [Mon, 24 Jun 2019 08:23:44 +0000 (17:23 +0900)]
backend-drm: make linear modifier to default

Make the linear modifier to the default of DRM format modifiers if
supported modifiers isn't get from kernel driver.

5 years agodoc/sphinx: Force sphinx to re-build everything as to avoid stale docs
Marius Vlad [Fri, 28 Jun 2019 10:16:12 +0000 (13:16 +0300)]
doc/sphinx: Force sphinx to re-build everything as to avoid stale docs

With the introduction of the 'docs' target we make sure that we always
build the documentation, but currently breathe is unaware of the fact
that the doxygen XML database was changed in between runs. It is obvious
when changing only source code not rST bits.

This patch makes sphinx ignore the saved environment and always
rebuild the docs.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoclients/presentation-shm: use xdg_shell instead of wl_shell
random human [Sat, 15 Jun 2019 17:32:05 +0000 (17:32 +0000)]
clients/presentation-shm: use xdg_shell instead of wl_shell

wl_shell is deprecated, and using xdg_shell allows the client to run on
compositors which do not implement the old protocol. Functionality
should be identical.

Signed-off-by: Astatos Aner <random.bored.human@gmail.com>
5 years agocompositor-drm: Split assign_planes() into separate file
Daniel Stone [Sat, 22 Jun 2019 17:40:31 +0000 (18:40 +0100)]
compositor-drm: Split assign_planes() into separate file

drm_assign_planes() is called to separate views out and decide what will
be taken out for plane composition and what will be left for the
renderer to compose.

It calls drm_output_propose_state() in order to find a good
configuration, which itself has a number of helpers that it calls. Break
these out into a separate file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Move state helpers to separate file
Daniel Stone [Tue, 18 Jun 2019 10:30:54 +0000 (11:30 +0100)]
compositor-drm: Move state helpers to separate file

Most of the state helpers (create, destroy, duplicate, etc) state, are
relatively straightforward and can live in a separate file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Move FB handling to a separate file
Daniel Stone [Tue, 18 Jun 2019 10:16:53 +0000 (11:16 +0100)]
compositor-drm: Move FB handling to a separate file

Move everything to do with creation, destruction, and reference handling
of drm_fbs to a new file.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Move KMS API use to separate file
Daniel Stone [Tue, 18 Jun 2019 10:12:07 +0000 (11:12 +0100)]
compositor-drm: Move KMS API use to separate file

Create a new file which handles most of the actual KMS API use. This
covers the property handling (in which we map between KMS properties and
our internal representations), as well as actually applying state
through atomic modesetting or the legacy SetCrtc/PageFlip/DPMS APIs.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Move mode handling to separate file
Daniel Stone [Mon, 17 Jun 2019 15:04:26 +0000 (16:04 +0100)]
compositor-drm: Move mode handling to separate file

Create a new file for the DRM backend's handling of output modes, e.g.
resolution, aspect ratio, preferred mode selection, EDID parsing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Pull EDID extraction into helper
Daniel Stone [Wed, 26 Jun 2019 21:56:39 +0000 (22:56 +0100)]
compositor-drm: Pull EDID extraction into helper

Create a helper function which populates a drm_head with the information
extracted from its connector's EDID and any other properties we can
find, such as physical size and connection status.

This is currently quite small, but may become more complex in future as
we parse EDID better. It also prepares to move this function into
another file in the next commit.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Create header for backend internals
Daniel Stone [Mon, 17 Jun 2019 11:13:46 +0000 (12:13 +0100)]
compositor-drm: Create header for backend internals

Create a new header called drm-internal.h, and move many of drm.c's
declarations and helpers to it.

This will allow us to split the DRM backend into multiple files.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agodesktop-shell: Click top left and align clock
- [Wed, 26 Jun 2019 21:00:43 +0000 (21:00 +0000)]
desktop-shell: Click top left and align clock

Pads launchers with the empty space that used to be around them. Moving
pointer to 0,0 and clicking launches the preferred app. First launcher
has more padding at its start to look nice.

Moves the clock to the right edge with same padding. Keeps one of the
two values for text extents that the code was already retrieving but
never read. Horizontal panel position centers the clock.

Sets text in the panel, meaning tooltips and the clock, to consistent 14
units of the default system font at 85% of the max brightness, so it's
less tiring on eyes.

5 years agogl-renderer: Support EGL_KHR_partial_update
Daniel Stone [Fri, 8 Feb 2019 05:29:05 +0000 (05:29 +0000)]
gl-renderer: Support EGL_KHR_partial_update

partial_update is an EGL extension which allows us to inform the driver
ahead of time the limits of the areas we'll be writing to. This helps
performance for GPU hardware which renders into a local tile buffer:
informing the driver of the rendering extents means it can avoid
fetching unchanged tiles into the tile buffer and subsequently writing
them out.

The extension complements rather than replaces EGL_EXT_buffer_age (used
before partial_update to know which areas we need to update) and
EGL_KHR_swap_buffers_with_damage (used after partial_update to inform
the winsys of the changed region).

Note however that partial_update deals in buffer-damage regions ('what
has changed since the last time I used _this_ buffer?'), whereas
swap_buffers_with_damage deals in surface-damage regions ('what has
changed since the last time I rendered?'). An explanatory diagram can be
found in the specification:
https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_partial_update.txt

Fixes: #134
Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Add EGL_EXT_partial_update query
Daniel Stone [Fri, 8 Feb 2019 05:00:52 +0000 (05:00 +0000)]
gl-renderer: Add EGL_EXT_partial_update query

Query for the extension itself and the core entrypoint.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Demystify output repaint slightly
Daniel Stone [Tue, 25 Jun 2019 19:50:26 +0000 (20:50 +0100)]
gl-renderer: Demystify output repaint slightly

Add some comments in the function to make it clear what's going on,
especially as we twist and turn between a lot of things called 'damage'
meaning different things in different co-ordinate spaces.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Rename buffer_damage variable
Daniel Stone [Tue, 25 Jun 2019 19:30:59 +0000 (20:30 +0100)]
gl-renderer: Rename buffer_damage variable

The buffer_damage variable stores accumulated damage from previous
frames. This is the area that, before considering our current repaint
request, we need to repaint in order to bring the older buffer up to
date with the last buffer we rendered into.

Rename to previous_damage so it's a bit more clear what this refers to.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Rename border_damage variable
Daniel Stone [Tue, 25 Jun 2019 19:29:04 +0000 (20:29 +0100)]
gl-renderer: Rename border_damage variable

Technically it is storing which areas of the border are damaged.
However, we already have damage-region variables which need to be
translated by the border region. Rename the variable to not contain the
word 'damage' to reduce confusion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Use helper for conversion to EGL rects
Daniel Stone [Fri, 8 Feb 2019 13:20:51 +0000 (13:20 +0000)]
gl-renderer: Use helper for conversion to EGL rects

eglSwapBuffersWithDamage has to convert a damage region from Weston's
global co-ordinate space, into the co-ordinate space for EGL rendering
into a buffer for that output.

The conversion from the global co-ordinate space in logical pixels to
the output space in buffer pixels is slightly long and error-prone,
involving translating by the output's offset within the global
co-ordinate space, multiplying by output scale, and also translating to
allow for any borders we paint around the output.

After this is done, we need to flip the co-ordinates in the Y axis to
account for the lower-left-origin co-ordinate space used by EGL.

Since we want to reuse this for partial_update, but using a different
source region, extract this conversion into a well-commented helper we
can reuse.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Don't use swap_buffers_with_damage with fan debug
Daniel Stone [Fri, 8 Feb 2019 05:26:54 +0000 (05:26 +0000)]
gl-renderer: Don't use swap_buffers_with_damage with fan debug

Fan debug mode repaints the whole surface in order to clear any 'trails'
left over from previous fan paints. If this happens, fall back to using
regular eglSwapBuffers rather than eglSwapBuffersWithDamageEXT, since
the damage region we would pass will be too small.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Convert remaining pseudo-bools to real bool
Daniel Stone [Fri, 8 Feb 2019 04:54:26 +0000 (04:54 +0000)]
gl-renderer: Convert remaining pseudo-bools to real bool

Use the actual boolean type instead of an integer for variables which
only hold true or false.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogl-renderer: Convert extension pseudo-bools to real bool
Daniel Stone [Fri, 8 Feb 2019 04:54:26 +0000 (04:54 +0000)]
gl-renderer: Convert extension pseudo-bools to real bool

Use the actual boolean type instead of an integer for variables which
only hold true or false.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agopixel-formats: Remove duplicate doc string
Daniel Stone [Wed, 26 Jun 2019 11:26:28 +0000 (12:26 +0100)]
pixel-formats: Remove duplicate doc string

pixel_format_get_info() is already documented in the headers; no need to
also document it next to the code.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agodoc: Remove clang-parsing definitions
Daniel Stone [Wed, 26 Jun 2019 11:25:44 +0000 (12:25 +0100)]
doc: Remove clang-parsing definitions

These definitions were just set to the default (off), but their presence
causes Fedora's Doxygen to emit a warning as it is not compiled with
Clang support.

Remove them as they are no-ops anyway.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agogitlab-ci: Fix pages generation for the documentation
Marius Vlad [Tue, 25 Jun 2019 14:17:08 +0000 (17:17 +0300)]
gitlab-ci: Fix pages generation for the documentation

Fixes 0a13641ff: "gitlab-ci: Enable gitlab page for publishing documentation",
to point to correct sphinx documentation.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agogitlab-ci: Enable gitlab page for publishing documentation
Marius Vlad [Fri, 14 Jun 2019 13:00:07 +0000 (16:00 +0300)]
gitlab-ci: Enable gitlab page for publishing documentation

While adding pages, remove CI_JOB_ID and CI_JOB_SHA from PREFIX, as this
apparently is not needed. Make build-native-meson a dependency for the
pages stage.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agogitlab-ci: Install doxygen/sphinx/breathe and enable building documentation
Marius Vlad [Tue, 11 Jun 2019 08:57:40 +0000 (11:57 +0300)]
gitlab-ci: Install doxygen/sphinx/breathe and enable building documentation

Pinned down sphinx to 2.1.0 and breathe to 4.13.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agodoc/sphinx: Add 'weston_compositor', 'weston_output' and 'weston_head' API
Marius Vlad [Fri, 14 Jun 2019 10:25:40 +0000 (13:25 +0300)]
doc/sphinx: Add 'weston_compositor', 'weston_output' and 'weston_head' API

Demonstrates how to call/use the 'doxygen*' breathe directives. Make
use of previous patches that tag symbols using 'ingroup' doxygen
command.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Add ingroup tag for weston_compositor
Marius Vlad [Tue, 11 Jun 2019 13:08:55 +0000 (16:08 +0300)]
libweston: Add ingroup tag for weston_compositor

This is a continuation of "e2cc7aa40fd: libweston: Define head, output and
compositor group".

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Add ingroup tag for weston_output
Marius Vlad [Mon, 10 Jun 2019 22:15:35 +0000 (01:15 +0300)]
libweston: Add ingroup tag for weston_output

This is a continuation of "e2cc7aa40fd: libweston: Define head, output and
compositor group".

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Define head, output and compositor group
Marius Vlad [Mon, 10 Jun 2019 21:05:08 +0000 (00:05 +0300)]
libweston: Define head, output and compositor group

Also, add tag symbols related to 'weston_head'.

The bridge between sphinx and doxygen (breathe) has a useful directive:
doxygengroup. By using it we can scoop out symbols we'd like to display
documentation from/of.

At the same time some bits of the code has been using '\memberof' (a
doxygen command useful in C code to establish class like
relationship between objects and functions) but this seems not to be
recognized by the sphinx bridge.

Until we find a better solution, we replace '\memberof' command with
'\ingroup' one as to tag the symbols with an "object". This patch does
that for 'weston_head' object.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agodoc/sphinx: Add doxygen aliases for easier rst embedding
Marius Vlad [Thu, 6 Jun 2019 20:10:49 +0000 (23:10 +0300)]
doc/sphinx: Add doxygen aliases for easier rst embedding

With these aliases we can use rST directives inside comment blocks. This
adds also a doxygen command '\rststar' where ignores the asterisk --
typical to multi-line comment blocks.

While at it, add a simple example on how to use them.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agodoc/sphinx: Further configure doxygen
Marius Vlad [Fri, 14 Jun 2019 10:14:00 +0000 (13:14 +0300)]
doc/sphinx: Further configure doxygen

Turn warnings into errors so we can spot them immediately.

While at it: no need to generate class graphs as we're not using it and
make doxygen run quieter.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoREADME/CONTRIBUTING: Markdown fixes
Marius Vlad [Fri, 14 Jun 2019 10:10:12 +0000 (13:10 +0300)]
README/CONTRIBUTING: Markdown fixes

Found while being parsed by doxygen (when used recursively), this fixes
the markdown bits as to be displayed properly.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoclients: Fix/resolved doxygen warnings
Marius Vlad [Fri, 14 Jun 2019 10:04:52 +0000 (13:04 +0300)]
clients: Fix/resolved doxygen warnings

Missing/wrong parameters and '[out]' issues.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agopixel-formats: Fix doxygen warnings about missing format
Marius Vlad [Wed, 12 Jun 2019 13:25:07 +0000 (16:25 +0300)]
pixel-formats: Fix doxygen warnings about missing format

We already have documentation in header which conflicts with the one
the source code. Remove it entirely as it confuses user as well.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agolibweston: Fix/clean-up doxygen warnings
Marius Vlad [Wed, 12 Jun 2019 13:05:44 +0000 (16:05 +0300)]
libweston: Fix/clean-up doxygen warnings

This fixes warnings for weston-debug, input, compositor, log and
linux-explicit-sync. Warnings range from swapping '[in]', '[out]' with
the function arguments to wrong parameter names.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agoREADME: Add a few words about building weston documentation
Marius Vlad [Wed, 5 Jun 2019 10:29:16 +0000 (13:29 +0300)]
README: Add a few words about building weston documentation

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agobuild: Add sphinx/breathe support for generating documentation
Marius Vlad [Fri, 14 Jun 2019 09:41:02 +0000 (12:41 +0300)]
build: Add sphinx/breathe support for generating documentation

This is adds basic configuration files for doxygen and for breathe,
which is a doxygen-to-sphinx bridge that can document C symbols.

Breathe is configured with default project 'weston' and implicitly adds
:members: and :undoc-members: to breathe configuration options.
This allows a shorter way to call breathe directives without the need
specify the project and also to display implicitly all the members,
documented or not.

A 'docs' run_target to force the docs to be re-built has been added.
Initially (the first time the build system is ran) the documentation
will automatically be built, but later re-builds will require the use of
the 'docs' target. This avoid further delays in building weston but in
the same time allows the possiblity to update/improve the documentation
bits to those who want that.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agodoc: Move helper scripts to doc/scripts
Marius Vlad [Fri, 14 Jun 2019 07:43:40 +0000 (10:43 +0300)]
doc: Move helper scripts to doc/scripts

No functional change, just re-arrange bits in doc/.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
5 years agocompositor-drm: Remove legacy plane and vblank usage
Daniel Stone [Mon, 17 Jun 2019 10:23:25 +0000 (11:23 +0100)]
compositor-drm: Remove legacy plane and vblank usage

As of the previous commit, we never create state which uses overlay
planes on non-atomic drivers. We can thus remove the calls to
drmModeSetPlane.

The only time we ever waited for vblank events was when we had called
drmModeSetPlane and needed to make sure we waited until it was active.
We can thus also remove all the vblank event machinery.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agocompositor-drm: Only assign planes with atomic
Daniel Stone [Mon, 17 Jun 2019 10:13:20 +0000 (11:13 +0100)]
compositor-drm: Only assign planes with atomic

Without atomic modesetting, we have no way to know whether or not our
desired configuration is usable. It might fail for a number of reasons:
scaling limits, bandwidth limits, global resource (e.g. decompression)
unit contention, or really just anything.

Not only this, but there is no good way to ensure that our configuration
actually lands together in the same refresh cycle - hence the 'atomic'
in atomic modesetting. Some drivers implement a synchronously blocking
drmModeSetPlane, whereas others return immediately. Using overlay planes
can thus decimate your framerate.

The pre-atomic API is not extensible either, so we need numerous out
clauses: fail if we're cropping or scaling (sometimes), or changing
formats, or fencing, or ...

Now we've had atomic support stable for a couple of releases, just
remove support for doing anything more fancy than displaying our
composited output and a cursor with drivers which don't support atomic
modesetting.

Support for using overlay planes was already disabled by default when
using the legacy API, and required a debug key combination to toggle it
on by flipping the sprites_are_broken variable. We can ensure that we
never try to use it on legacy by simply ignoring the hotkey when in
legacy mode.

Signed-off-by: Daniel Stone <daniels@collabora.com>
5 years agobackend-rdp: allow to force compression off
Stefan Agner [Thu, 20 Jun 2019 14:27:27 +0000 (16:27 +0200)]
backend-rdp: allow to force compression off

By default the client communicates its preference with regards to
compression to the server. However, some clients always use
compression, which is not ideal for certain environments (e.g.
low performance embedded devices in a local network with plenty
of bandwidth). Allow to disable compression server-side which will
override the clients request for compression.

Signed-off-by: Stefan Agner <stefan@agner.ch>