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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
- [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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Stefan Agner [Mon, 17 Jun 2019 10:33:35 +0000 (12:33 +0200)]
backend-rdp: fix memory leak
Free command data after all rects have been updated. This fixes a
rather huge memory leak when using the RDP backend.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Silva Alejandro Ismael [Mon, 17 Jun 2019 14:35:54 +0000 (11:35 -0300)]
build: Fix hint to disable remoting
If a dependency is missing, the error message should tell the build option to disable it.
Show the correct build option in the error message of the remoting plugin.
Signed-off-by: Silva Alejandro Ismael <silva.alejandro.ismael@gmail.com>
Robert Beckett [Thu, 13 Jun 2019 15:55:44 +0000 (16:55 +0100)]
backend-drm: handle multiple drm nodes with logind
When using logind launcher, we receive a PauseDevice "gone" message
from logind session management for each device we close while looking
for KMS devices.
Make logind notify the backend of the device add/remove so that the
backend can decide what to do, instead of assuming that if it is a
DRM_MAJOR device the session should be (de)activated. The backend can
then react to its specific device.
Fixes #251
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Tomohito Esaki [Wed, 27 Mar 2019 06:45:33 +0000 (15:45 +0900)]
compositor-drm: run finish_frame when dpms is turned off in update_complete
A output repaint loop isn't scheduled beacuse the output repaint_status
is AWAITING_COMPLETION when dmps is turned off in update_complete().
Therefore, the display attached to the output is remain inactive even if
weston wakes up. By going through finish_frame, the output
repaint_status is fixed to correct status.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Daniel Stone [Tue, 11 Jun 2019 10:41:41 +0000 (11:41 +0100)]
Default build to warning_level=3
After suppressing the pedantic errors, we can now enable a higher
warning_level by default, so developers can catch warnings earlier.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Tue, 11 Jun 2019 10:40:13 +0000 (11:40 +0100)]
build: Suppress 'pedantic' GCC warnings
GCC's 'pedantic' warnings warn about a bunch of things which are true of
ISO C but not the toolchains we care about (GCC, Clang). Suppress those
warnings to allow us to build with Meson's warning_level=3.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Tomohito Esaki [Mon, 1 Apr 2019 08:50:14 +0000 (17:50 +0900)]
desktop-shell: unmap a view which was faded out
When Fading out a destroyed surface view finishes, the view is rendered
with very little alpha. After that, since the output isn't updated
unless a event on the output doesn't occurs, the view is still on the
output. By unmapping the view, the output repaint scheduled without the
surface.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Daniel Stone [Tue, 11 Jun 2019 10:32:14 +0000 (11:32 +0100)]
weston: Properly test for output-creation failure
We were testing the wrong variable to see if output creation had failed:
instead of testing the return of the function we'd just called, we were
testing something we'd already checked earlier.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Mon, 22 Apr 2019 17:09:27 +0000 (18:09 +0100)]
timespec: Don't return value from void function
timespec_add_msec() doesn't return any values, so don't try to return
any.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Mon, 22 Apr 2019 17:05:56 +0000 (18:05 +0100)]
dbus: Don't return value from void function
Just discard the value, rather than trying to return a value from a void
function.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Harish Krupo [Sat, 20 Apr 2019 12:20:18 +0000 (17:50 +0530)]
desktop-shell: Re-position views when outputs change
When the last output is destroyed or when a new output is created after
the last output is destroyed, we need to re-position the views to ensure
that all the views are displayed on the output.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/210
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Harish Krupo [Sat, 20 Apr 2019 12:40:56 +0000 (18:10 +0530)]
desktop-shell: Don't re-position views when output_list is empty
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Fabrice Fontaine [Mon, 10 Jun 2019 10:02:03 +0000 (12:02 +0200)]
Fix build with kernel < 4.4
weston includes input-event-codes.h since version 5.0.91 and
https://github.com/wayland-project/weston/commit/
6e229ca26381bc8191fd9af1e439c311da709aff
input-event-codes.h is available only since kernel 4.4 and
https://github.com/torvalds/linux/commit/
f902dd893427eade90f7eaf858e5ff8b150a5a12
To fix this build failure, replace include on linux/input-event-codes.h
by linux/input.h
Fixes:
- http://autobuild.buildroot.org/results/
210c2759900f15ea0030d088f6f45cd8bb199b29
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Silva Alejandro Ismael [Fri, 31 May 2019 19:39:43 +0000 (16:39 -0300)]
compositor: fix segfaults if wl_display_create fails
Added check to log the error if wl_display_create return NULL.
Fixes: #101
Signed-off-by: Silva Alejandro Ismael <silva.alejandro.ismael@gmail.com>
Scott Anderson [Wed, 29 May 2019 06:27:30 +0000 (18:27 +1200)]
compositor: Fix incorrect use of bool options
WESTON_OPTION_BOOLEAN takes a pointer to an int as an argument, but
there were several cases of being passed a pointer to a bool instead.
This changes it to use a local int instead, and then write that value to
the bool.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Antonio Borneo [Fri, 24 May 2019 10:53:39 +0000 (12:53 +0200)]
Fix build-time warning with meson 0.50.1
Commit
6666dee52b1e ("man: Add weston-bindings(7) describing
desktop shell shortcuts") adds in file "man/meson.build" the line
install: true,
This line triggers a warning with meson 0.50.1:
WARNING: Project targetting '>= 0.47' but tried to use
feature introduced in '0.50.0': install arg in configure_file
Accordingly with
https://github.com/mesonbuild/meson/issues/5048
the line was silently ignored by meson before 0.50.0
One possible fix for this warning would require updating the
minumum version of meson required by weston, but then forcing every
builder to update meson.
Instead, since all the other instances in "man/meson.build" of
configure_file don't use the feature "install:", it seams safe to
simply remove the feature for the instal of "weston-bindings.man".
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Manuel Stoeckl [Wed, 27 Mar 2019 01:00:55 +0000 (21:00 -0400)]
man: Add weston-bindings(7) describing desktop shell shortcuts
The desktop-shell-specific bindings were identified from
shell_add_bindings in desktop-shell/shell.c. Various general shortcuts
(like Ctrl+Alt+F) are provided by files in libweston/ and compositor/ .
Also introduce references to the new manual in weston(1) and weston.ini(5).
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Manuel Stoeckl [Sat, 23 Mar 2019 23:03:59 +0000 (19:03 -0400)]
man: Update "See also" references for weston.1
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Pekka Paalanen [Fri, 5 Apr 2019 10:23:53 +0000 (13:23 +0300)]
backend-fbdev: more into new subdir
For consistency with other backends.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 10:20:53 +0000 (13:20 +0300)]
backend-x11: move into new subdir
For consistency with other backends.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 10:17:22 +0000 (13:17 +0300)]
backend-wayland: move into new subdir
For consistency with other backends.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 10:14:15 +0000 (13:14 +0300)]
backend-rdp: move into new subdir
For consistency with other backends.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 10:11:01 +0000 (13:11 +0300)]
backend-headless: move into new subdir
For consistency with other backends.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 09:58:27 +0000 (12:58 +0300)]
backend-drm: move into new subdir
Move the DRM-backend into a new sub-directory to make it stand out from
libweston core. This facilitates splitting drm.c into more files later.
vaapi-recorder is used only by DRM-backend, move that too.
libbacklight is used only by DRM-backend and a manual test program, and is
moved as well.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 09:45:46 +0000 (12:45 +0300)]
tests: build setbacklight
Was missed in the Meson migration.
This is built only if DRM-backend is built, because it exercises a sub-feature
of the DRM-backend.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 09:28:14 +0000 (12:28 +0300)]
build: make backlight a helper lib
Right now only used by the DRM-backend, but there is a test program that should
use this as well.
This helps with building the test program and moving DRM-backend into a
subdirectory.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Pekka Paalanen [Fri, 5 Apr 2019 09:04:58 +0000 (12:04 +0300)]
build: make libinput-backend a helper lib
Rather than having fbdev and drm backends include the libinput files ad hoc,
wrap them in a static library. Using the dependency object for that helper
library will then automatically pull in any necerray include dirs for the
users.
This helps with moving the backends into subdirectories.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Tue, 30 Apr 2019 17:26:32 +0000 (20:26 +0300)]
build: libweston doesn't need -export-dynamic
According to https://gitlab.freedesktop.org/wayland/weston/merge_requests/159#note_148104
it doesn't make sense to use export-dynamic on libraries.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Marius Vlad [Mon, 29 Apr 2019 10:33:54 +0000 (13:33 +0300)]
include: Install weston-debug header
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Mon, 29 Apr 2019 10:27:47 +0000 (13:27 +0300)]
libweston: Add weston-debug header to libweston
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:50:28 +0000 (13:50 +0300)]
weston-debug: Remove weston_compositor from weston_log_context
This is no longer needed. Also assert if the context passed is NULL and
compositor log context is already set.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:47:06 +0000 (13:47 +0300)]
libweston: Rename weston_debug_scope_ to weston_log_scope_
Rename also the functions which work on weston_log_scope.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 10:05:38 +0000 (13:05 +0300)]
libweston: Rename weston_debug_scope to weston_log_scope
This is a continuation of the previous patch to align more closely to
the weston log framework.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Wed, 17 Apr 2019 09:35:38 +0000 (12:35 +0300)]
libweston: Rename weston_debug_compositor to weston_log_context
As we transition towards a more generic API for weston loggging
framework rename weston_debug_compositor to weston_log_context to show
the fact that this is not really debug but a logging context.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sun, 7 Apr 2019 16:07:16 +0000 (19:07 +0300)]
compositor: Convert weston-debug framework to use weston_debug_compositor
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Marius Vlad [Sun, 7 Apr 2019 14:07:58 +0000 (17:07 +0300)]
libweston: Decouple weston_debug_compositor from weston_compositor
This patch allows initialization of weston-debug/log framework much earlier
than weston_compositor, which in turn will provide the option start
logging before weston_compositor has been created.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Harish Krupo [Thu, 9 May 2019 09:56:04 +0000 (15:26 +0530)]
gitlab-ci: Use gitlab.fdo URL for wayland-protocols
Signed-off-by: Harish Krupo <harishkrupo@gmail.com>
Marius Vlad [Mon, 6 May 2019 17:15:06 +0000 (20:15 +0300)]
libweston: Remove functions with no implementation/definition
Seems that these functions: weston_compositor_fade()/weston_compositor_unlock()
lost their implementation a while ago.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Antonio Borneo [Fri, 26 Apr 2019 21:57:31 +0000 (23:57 +0200)]
log: remove "%m" from format strings by using strerror(errno)
The printf() format specifier "%m" is a glibc extension to print
the string returned by strerror(errno). While supported by other
libraries (e.g. uClibc and musl), it is not widely portable.
In Weston code the format string is often passed to a logging
function that calls other syscalls before the conversion of "%m"
takes place. If one of such syscall modifies the value in errno,
the conversion of "%m" will incorrectly report the error string
corresponding to the new value of errno.
Remove all the occurrences of the specifier "%m" in Weston code
by using directly the string returned by strerror(errno).
While there, fix some minor indentation issue.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
- [Thu, 2 May 2019 17:35:29 +0000 (17:35 +0000)]
zunitc: Fix undeclared identifier 'NULL'
Since v6 release, -Dtest-junit-xml=false build regressed because its
ifdef branch no longer includes stddef.h and thus NULL, either directly
or through another header. Using musl-1.1.22 and llvm-8.0.0.
Antonio Borneo [Mon, 29 Apr 2019 15:54:10 +0000 (17:54 +0200)]
clients: close unused keymap fd
In the simple examples in which keymap is not handled, the open
descriptor has to be properly closed.
After each suspend/resume sequence the keymap is send again to
every client. On client weston-simple-egl the leak causes a
segfault when no more file descriptors can be opened.
Close the file descriptor and lazily copy/paste the comment
already available in simple-dmabuf-v4l.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>