-
3938b061
by Simon Ser
at 2020-01-24T21:20:02+01:00
build: re-open master for regular development
-
1f3615f3
by Pekka Paalanen
at 2020-01-27T12:15:20+02:00
tests: test-runner needs wayland-client
weston-test-runner.h includes wayland-util.h, therefore it needs
wayland-client. A partial dependency with just compile_args might have been
enough as it does not seem to use functions from wayland-util.c, but safer this
way and no harm.
Fixes: https://lists.freedesktop.org/archives/wayland-devel/2020-January/041149.html
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
9dccfd1e
by Pekka Paalanen
at 2020-01-27T12:14:14+00:00
doc: output management sequence diagrams
When we were designing the libweston output API, I wrote a design document
as a Phabricator wiki page. Phabricator is no longer accessible so that
information needs to be migrated to a new place. Here I am converting most of
it into libweston Sphinx documentation, particularly pulling in the sequence
diagrams I drew. This should help people understand how libweston output
configuration works.
The diagrams are committed as both MSC source files and rendered PNG files. I
did not bother tinkering with the build to run mscgen automatically and then
with the CI images to install the tool.
The Sphinx configuration need numref explicitly enabled so that figures are
automatically numbered and can be referenced by their number rather than their
whole caption text(!).
The document structure is changed a little better flowing with Output
Management being the overview page and the Heads and Outputs being the API
pages.
First I wrote the struct weston_output and weston_head descriptions in Doxygen
comments in libweston.h, but then in the API page that text would have been
buried somewhere towards the end of the page. So I put that text in ReST
instead where it comes as first on the pages as it should. The doc for the
structs only contain a link to the top of the page. Yes, the comment style in
libweston.h is a little broken. If I left the asterisk there it would show up
as a bullet point in Sphinx. OTOH putting everything from \rst in a single line
did not produce anything.
Because Sphinx cannot look in two places, the images need to be copied into the
build dir too.
mscgen: http://www.mcternan.me.uk/mscgen/
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/25
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
861d93ff
by Leandro Ribeiro
at 2020-01-27T13:31:01-03:00
weston-log: rename a confusing parameter name in weston_compositor_add_log_scope()
In the function weston_compositor_add_log_scope() we have
a struct weston_log_context parameter that in the .c file
is named log_ctx. In the .h, the same parameter is named
compositor. This is confusing, since its type is not
struct weston_compositor, but struct weston_log_context.
Rename the parameter in the .h to log_ctx.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
ee73105f
by Leandro Ribeiro
at 2020-01-27T13:31:01-03:00
weston-log: rename a confusing parameter name in weston_log_subscription_printf()
In the function weston_log_subscription_printf() we have
a struct weston_log_subscription parameter that in the .c file
is named sub. In the .h, the same parameter is named scope.
This is confusing, since its type is not struct weston_log_scope,
but struct weston_log_subscription.
Rename the parameter in the .h to sub.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
5976dbbb
by Leandro Ribeiro
at 2020-01-27T13:42:42-03:00
weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.
Also, bump libweston_major to 9.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
f014964f
by Leandro Ribeiro
at 2020-01-27T13:43:24-03:00
weston-log: rename the confusing function name weston_compositor_log_scope_destroy()
There's a function named weston_compositor_log_scope_destroy()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_scope_destroy(), as the argument is a
struct weston_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
60b6572b
by Scott Anderson
at 2020-01-28T12:30:56+00:00
Fix Wmaybe-uninitialized warnings
Just a couple of places which shouldn't be possible, so initialized and
added assertions to make sure.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
b4bd12b7
by Guillaume Champagne
at 2020-01-29T09:49:41+00:00
launcher: move weston_environment_get_fd
weston_environment_get_fd was declared in weston-launch and implemented
in compositor.c. Since the function is not used elsewhere in the code,
it is replaced by a static function in launcher-weston-launch.c
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
1cb09480
by Guillaume Champagne
at 2020-01-29T09:49:41+00:00
window: fix missing prototypes warning
Declare touch_handle_shape and touch_handle_orientation as static
functions as they are local to window.c.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
f1e8fc9d
by Guillaume Champagne
at 2020-01-29T09:49:41+00:00
libweston: add missing include
Fixes missing prototypes compilation warnings emitted when a function
is defined before its prototype is declared.
These warnings were introduced over time since the switch to meson
because the -Wmissing-protoypes was not included in the compilation
arguments.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
556afd14
by Guillaume Champagne
at 2020-01-29T09:49:41+00:00
meson: add -Wmissing-prototypes to the build
Meson's warning level maps to -Wall, -Wextra and -Wpedantic.
-Wmissing-prototypes is added by neither of those flag. Consequently,
it is manually added to the build command line arguments.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
ac691a89
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
f66685d9
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
weston-log: add function to avoid direct access to compositor members in non-core code
If we use the function weston_log_context_add_log_scope()
in non-core code, it's necessary to access
weston_compositor::weston_log_ctx.
This is not ideal, since the goal is to make core structs
(weston_compositor, weston_surface, weston_output, etc)
opaque.
Add function weston_compositor_add_log_scope(), so non-core
users are able to pass weston_compositor as argument instead
of weston_compositor::weston_log_ctx.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
172afc21
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
backend-drm: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
ce100196
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
compositor: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
fa505c58
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
content-protection: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
23289358
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
pipewire: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
bdd45d62
by Leandro Ribeiro
at 2020-01-29T09:55:24+00:00
xwayland: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
134e1496
by Pekka Paalanen
at 2020-01-29T11:31:11+00:00
xwm: fix initially-fullscreen windows
It looks like commit ad0da4596d6315b18e888af75eee0a9bad1ff44d introduced a bug
for X11 windows that are initially fullscreen by adding code to the end of
xserver_map_shell_surface() while ignoring the 'return' that this patch
removes. That may have caused some annoying window state issues, but the
problem became more pronounced with 7ace831ca6205ea288e49fdbd6b63f53e73fae59
when used with an Xwayland version that honours _XWAYLAND_ALLOW_COMMITS.
In the latter case, there is a possiblity the window will never show up, as XWM
forgets to set allow_commits=true. However, the window may sometimes actually
show up due to an oversight in Xwayland: the Present code may be flipping the
window buffers and not checking _XWAYLAND_ALLOW_COMMITS if it is supposed
commit at all.
Since then, f568968f8a30eab6bfd8a15518014deb8f6c81d5 added more places where
allow_commits is set to true, masking the window-does-not-show-up issue. Window
pending state likely still remained an issue.
This patch properly fixes the "window never appears" issue by making sure
allow_commit=true is set. At the same time, it ensures the pending state
functions are called at the end of xserver_map_shell_surface(), which may fix
some window state issues like misplaced decorations and/or position of
initially-fullscreen windows. Unfortunately, it certainly does not fix all such
state problems.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
a24989e4
by Pekka Paalanen
at 2020-01-29T11:31:11+00:00
xwm: remove configure_source on dispatch
This function is called also directly from weston_wm_window_set_toplevel(). If
configure_source is set at that point, simply resetting the pointer will "leak"
the source until it fires and calls this function again.
Let's keep the variable up-to-date by removing the source when called,
dispatched or not. This removes the second call. I only hope it doesn't cause
issues. This is also necessary if we intend to remove the source on window
destruction too.
Found by inspection.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
dcd2b420
by Pekka Paalanen
at 2020-01-29T11:31:11+00:00
xwm: remove configure_source on destroy
It would lead to use-after-free if there was a pending idle callback to
weston_wm_window_configure() when the weston_wm_window gets destroyed. Make
sure the callback will not fire.
Found by inspection.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
2add2176
by Pekka Paalanen
at 2020-01-29T11:31:11+00:00
xwm: do not configure frame window None
Spotted this in debug log:
[xwm-wm-x11] XWM: configure window 4194324: x=32 y=32 width=1920 height=1080 border_width=0 stack_mode=0
[xwm-wm-x11] XWM: configure window 0: width=1984 height=1144
Trying to configure window 0 makes no sense. So do not try.
To avoid patching two different places with the same thing, refactor the code
into a common helper.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
83fb745c
by Pekka Paalanen
at 2020-01-29T11:31:11+00:00
xwm: always configure on send_configure()
There is more state than just the application window width and height that
affects whether calling weston_wm_window_configure() is necessary: everything
that affects the frame window, fullscreen state in particular. Therefore do not
skip the call by just width and height.
If send_configure() happens to be called "unnecessarily", this will now forward
some of those calls to the X11 clients. However, since it uses an idle task, it
should not result in a flood at least. And if send_configure() is spammed,
maybe that should then be fixed in its callers.
This patch should fix the misplacement of a fullscreen X11 window due to the
frame window being incorrectly sized and positioned, and the app window
incorrectly positioned inside the frame window.
The fullscreen window problems were observed in a case where the window does
not hit legacy_fullscreen() but first maps and then sets
_NET_WM_STATE_FULLSCREEN. Additionally the initial window size must match the
output size where it gets fullscreened. In that case the frame window was left
as if not fullscreened.
This practically reverts 3f53d9179bcdb11d053527336ac4a49f274bc8d1. I'm not sure
what problem that patch was fixing, but I couldn't make any resizing freeze.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
4960955e
by Marius Vlad
at 2020-01-29T14:39:04+00:00
client/dmabuf-v4l: Use zwp_linux_dmabuf version 3
We're missing format checks and still using first version of
zwp_linux_dmabuf protocol. Use the latest release and check that the
advertised formats/modifier accepts the user-supplied requested DRM
format.
Accept the format only if the modifier is LINEAR (@emersion).
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
baa1ef22
by Marius Vlad
at 2020-01-29T14:39:04+00:00
clients/dmabuf-v4l: Pass FLAGS_Y_INVERT to linux-dmabuf if v4l2 reports so
Zero-initialize the display as to correctly pass the options if it was
supplied (@emersion).
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
3345452c
by Marius Vlad
at 2020-01-29T14:39:04+00:00
clients/simple-dmabuf-v4l: Convert to use getopt_long
Makes adding further flags/options/args much easier.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
b6d1509d
by Marius Vlad
at 2020-01-29T14:39:04+00:00
clients/simple-dmabuf-v4l: Add Y_INVERT option flag
Allow clients to pass Y_INVERT, not only when v4l reports it so.
Document it briefly and add a note about this Y_INVERT flag is passed
if the camera sensors is detected as being y-flipped.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
ab2c72b0
by Marius Vlad
at 2020-01-29T14:39:04+00:00
clients/simple-dmabuf-v4l: Add 'weston-direct-display' protocol
Makes use of weston-direct-display protocol to pass the dmabuf
straight to the display-controller if such a path is possible.
Removes the Y_INVERT flag in case that was passed, and notifies
the user about it, as the weston implementation would force going
through the renderer when passing the Y_INVERT flag, but in the same
time direct-display avoids any GPU import so having them both in the
same time would result into weston refusing the create a buffer.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
dd718b07
by Marius Vlad
at 2020-01-29T14:39:04+00:00
clients/simple-dmabuf-v4l: Dmabuf-contiguous for vivid module
For certain cases when using vivid module, some display-controllers
require to allocate the dmabuf in a contiguous fashion so explain that
to the user when adding details about vivid module.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
bd9c0a6f
by Leandro Ribeiro
at 2020-01-29T12:08:54-03:00
weston-log: fold weston_log_ctx_compositor_setup() into weston_compositor_create()
The function weston_log_ctx_compositor_setup() is being called only inside
weston_compositor_create() and it is so tiny that the code gets easier to
follow if it gets folded in weston_compositor_create().
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
4f13595a
by Leandro Ribeiro
at 2020-01-29T12:08:54-03:00
weston-log: rename weston_log_ctx_compositor_create() to weston_log_ctx_create()
Since weston_log_ctx_compositor_create() does not have any relation
with weston_compositor, rename it to weston_log_ctx_create().
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
4ec38d18
by Leandro Ribeiro
at 2020-01-29T12:08:54-03:00
weston-log: replace weston_log_ctx_compositor_destroy() by weston_log_ctx_destroy()
The function weston_log_ctx_compositor_destroy(), which destroys struct
weston_log_context, takes weston_compositor as argument. We may have a
weston_log_context unlinked from a weston_compositor and currently there
is no way to destroy it.
Add function weston_log_ctx_destroy(), what makes the destruction of
weston_log_context independent of weston_compositor.
With this change, one could destroy a weston_compositor and keep the
related weston_log_context (since now weston_log_context can be destroyed
without the need of a weston_compositor). But if weston_compositor gets
destroyed it's also necessary to destroy weston_log_context::global,
as the debug protocol depends on the compositor. So a listener has been
added to the destroy signal of weston_compositor.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
ca640d51
by Leandro Ribeiro
at 2020-01-29T12:15:16-03:00
libweston: fold weston_compositor_tear_down() into weston_compositor_destroy()
The only reason why we have both weston_compositor_tear_down() and
weston_compositor_destroy() is that the only we had to destroy
the log context was keeping weston_compositor alive and calling
weston_log_ctx_compositor_destroy().
After commit "weston-log: replace weston_log_ctx_compositor_destroy()
by weston_log_ctx_destroy()", it's not necessary to keep a zombie
weston_compositor just to be able to call
weston_log_ctx_compositor_destroy().
Fold weston_compositor_tear_down() into weston_compositor_destroy(),
as this split is useless now.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
61a6b03d
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
compositor: add test suite data
Allow to set and get one opaque pointer. The test suite will then use this to
pass data from the test runner to the test plugin, so that the plugin can then
run what it needs to. This is useful when the test runner calls wet_main()
directly instead of forking a compositor.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
2c8203dc
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
tests: move exit() from run_test()
I will be able to re-use this function if it does not call exit() itself.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
babb3b3b
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
tests: thread-based client harness
This replaces the old test harness with a new one.
The old harness relied on fork()'ing each test which makes tests independent,
but makes debugging them harder. The new harness runs client code in a thread
instead of a new process. A side-effect of not fork()'ing anymore is that any
failure will stop running a test series short. Fortunately we do not have any
tests that are expected to crash or fail.
The old harness executed 'weston' from Meson, with lots of setup as both
command line options and environment variables. The new harness executes
wet_main() instead: the test program itself calls the compositor main function
to execute the compositor in-process. Command line arguments are configured in
the test program itself, not in meson.build. Environment variables aside, you
are able to run a test by simply executing the test program, even if it is a
plugin test.
The new harness adds a new type of iteration: fixtures. For now, fixtures are
used to set up the compositor for tests that need a compositor. If necessary, a
fixture setup may include a data array of arbitrary type for executing the test
series for each element in the array. This will be most useful for running
screenshooting tests with both Pixman- and GL-renderers.
The new harness outputs TAP formatted results into stdout. Meson is not
switched to consume TAP yet though, because it would require a Meson version
requirement bump and would not have any benefits at this time. OTOH outputting
TAP is trivial and sets up a clear precedent of random test chatter belonging
to stderr.
This commit migrates only few tests to actually make use of the new features:
roles is a basic client test, subsurface-shot is a client test that
demonstrates the fixture array, and plugin-registry is a plugin test. The rest
of the tests will be migrated later.
Once all tests are migrated, we can remove the test-specific setup from
meson.build, leaving only the actual build instructions in there.
The not migrated tests and stand-alone tests suffer only a minor change: they
no longer fork() for each TEST(), otherwise they keep running as before.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
82dd6ce8
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
tests: stop relying on environment in the new harness
Instead of relying on Meson setting up environment so that Weston and tests
find all their files, build those values into the tests. This way one can
execute a test program successfully wihtout Meson, simply by running it.
The old environment variables are still honoured if set. This might change in
the future.
Baking the source or build directory paths into the tests should not regress
reproducible builds, because the binaries where test-config.h values are used
will not be installed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
c22f3574
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
doc: overview of the test suite
This should lower the barrier to entry for writing more tests.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
57a4508e
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
tests: migrate string and vertex-clip
These are the only remaining standalone non-ZUC tests. They do not need any
changes to be built with the new harness - in fact they have already been
running through the new harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
7f840b72
by Pekka Paalanen
at 2020-01-30T10:10:34+00:00
tests: migrate ivi-layout-test
The ivi-layout-test comprises of two halves: the client and the plugin. This
migrates the test to the new test harness.
In the old harness, the plugin was built as the test in meson.build and it fork
& exec'd the client part. In the new harness client tests start from the client
program which sets up the compositor in-process, so now the client is built as
the test in meson.build and the plugin is just an additional file.
Therefore there is not need for the plugin for fork & exec anything anymore, so
all that code is removed.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
ad1a4102
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate ivi-layout-internal
Moving to the new harness.
It would be possible to convert every case here into a separate PLUGIN_TEST,
but I did not see the value in that at this time.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
431ec067
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate ivi-shell-app
Moving to the new test harness.
Carrying the test ini file still just to keep it the same even though I
accidentally noticed the test succeeds also with --no-config.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
9615ad8b
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate internal-screenshot
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
99c536db
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate surface, surface-global
These are normal plugin tests, moved to the new harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
af18eb0b
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
meson: remove tests_weston_plugin
All plugin tests have been converted to the new harness, so the old definition
can be removed.
The one remaining test surface-screenshot is a manual test, the plugin only
installs a debug key binding. Hence it is open-coded as a normal plugin, not as
a test.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
3fb67936
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate devices
The devices test was actually using the defaults instead of
weston-test-desktop-shell in meson.build, so this patch keeps it that way..
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
701676d8
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate client tests
This migrates all the client tests that have nothing special in them to the new
test harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
dd134988
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate linux-explicit-synchronization
Moved to the new test harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
56b94b58
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: migrate xwayland
Move xwayland test to the new harness.
This is the only test that can actually skip. It does it by exit(77) and that
is fine, because there is only one test case in the file so far. To get rid of
the exit() calls we need to return a value from the TEST() function but that is
a big surgery for another time.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
7df53497
by Pekka Paalanen
at 2020-01-30T10:10:35+00:00
tests: remove tests_weston and WESTON_TEST_CLIENT_PATH
This test category is empty, so it and all the supporting code can go.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
aaa5b82e
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: do not close tty prematurely
The tty file descriptor is used in signal handling (when switching
VT via SIGUSR1/SIGUSR2 for the VT_RELDISP ioctrl) and in quit() when
weston-launch exits for the KDSKBMUTE/KDSKBMODE/KDSETMODE/VT_SETMODE
ioctrls.
This fixes VT switching when using weston-launch from a non-VT shell
(e.g. ssh or from within a container).
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
77e3b056
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: get ttynr also when no user is given
In case an user is given but no tty, the code opens tty0 to allocate a
new tty. With that ttynr is known.
In case a tty name is given the user must be given too. In this case
we later recover the ttynr by using stat on the file tty file descriptor
which allows as to find the ttynr by looking at the devices minor number.
However, the third case, when no user and no tty name is given, we do
not get the ttynr.
This hasn't been a problem in practise since ttynr has not been used.
However, it makes sense to get the ttynr always for consistency. Also
upcomming fixes will start to make use of ttynr.
Fixes: 636156d5f693 ("weston-launch: Don't start new session unless -u is given")
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
cb24a7d1
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: fix newline in error message
Add newline character at the end of the error message to make sure we
get a new line after this error has been printed.
Fixes: a1450a8a71ef ("make error() portable")
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
c6f818a0
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: make sure weston-launch activates the VT
Currently weston-launch does not activate the VT when opening the
terminal directly (e.g. using --tty=/dev/tty7). Weston takes full
control over the terminal by switching it to graphical mode etc.
However, the old VT stays active as can be seen when looking at
sysfs:
# cat /sys/class/tty/tty0/active
tty1
Always switch to the new VT to make sure the correct VT is active.
This aligns with how TTY setup is implemented in launcher-direct.c.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
247392a3
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: check string truncation
Since weston-launch is a setuid-root program we should be extra careful:
Check for a potential string trunction. Move the check in a separate
function and return with error in case trunction has happened.
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
bd1e39a7
by Stefan Agner
at 2020-01-30T12:11:37+00:00
weston-launch: reset tty properly
On weston-launch exit we see errors such as:
failed to restore keyboard mode: Invalid argument
failed to set KD_TEXT mode on tty: Invalid argument
This has been resolved by making sure the tty file descriptor
does not get closed. However, the ioctrl's KDSKBMODE/KDSETMODE
and VT_SETMODE still fail with -EIO:
failed to restore keyboard mode: Input/output error
failed to set KD_TEXT mode on tty: Input/output error
It turns out the reason for this lies in some very particular
behavior of the kernel, the separation of weston-launch/weston
and the fact that we restore the tty only after the weston
process quits: When the controlling process for a TTY exits,
all open file descriptors for that TTY are put in a hung-up
state! For more details see this systemd-logind issue:
https://github.com/systemd/systemd/issues/989
We can work around by reopening the particular TTY. This allows
to properly restore the TTY settings such that a successive VT
switch will show text terminals fine again.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
10356a24
by Stefan Agner
at 2020-01-30T12:11:37+00:00
launcher-weston-launch: move send loop into separate function
Create a separate function handling the send loop. This allows to reuse
the same code later on.
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
da0cd688
by Stefan Agner
at 2020-01-30T12:11:37+00:00
launcher-weston-launch: avoid race condition when switching VT merge
When using weston-launch launcher deactivating the VT is sometimes
racy and leads to Weston still being displayed. The launcher-direct.c
backend makes sure that the session signal is emitted first, then DRM
master is dropped and finally the VT switch is acknowledged via
VT_RELDISP.
However, in the weston-launch case the session signal is emitted via
a socket message to the weston process, which might get handled a bit
later. This leads to dropping DRM master and acknowledging the VT
switch prematurely.
Add a socket message which allows weston to notify weston-launch that
the signal has been emitted and deactivating can be proceeded.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
7b36f171
by James Hilliard
at 2020-02-02T16:07:41-07:00
unconditionally include sys/mman.h in os-compatibility.c
Fixes:
../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’?
map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0);
^~~~~~~~~
LOCK_READ
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
-
6d2e73b3
by Daniel Stone
at 2020-02-03T20:00:54+00:00
gl-renderer: Fail earlier if shader compilation fails
If we can't compile our shaders, there's no point trying to link them.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
d76947b6
by Daniel Stone
at 2020-02-03T20:01:21+00:00
gl-renderer: Avoid double-free on init failure
If gl-renderer fails its initialisation, we return to compositor
teardown, which will try to free the renderer if ec->renderer was set.
This is unfortunate when we've already torn it down whilst failing
gl-renderer init, so just clear the renderer member so we don't try to
tear down twice.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Emil Velikov <emil.velikov@collabora.com>
-
9096dee4
by Guillaume Champagne
at 2020-02-04T13:30:19+00:00
headless: fix uninitialized variable
`no_outputs` is declared on the stack and left uninitialized if no
weston option changing its value is provided.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
7bce28b5
by Guillaume Champagne
at 2020-02-04T13:30:19+00:00
tests: release resources on compositor destruction
Releases touch devices and seat if they were allocated, clean up the
layers and free the weston_test structure.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
f0d3a614
by Sebastian Wick
at 2020-02-05T10:40:25+01:00
shared: guard all the seal logic behind HAVE_MEMFD_CREATE
The initial version of os_ro_anonymous_file missed two guards around the
seal logic which leads to a compilation error on older systems.
Also make the check for a read-only file symmetric in
os_ro_anonymous_file_get_fd and os_ro_anonymous_file_put_fd.
Signed-off-by: Sebastian Wick <sebastian@sebastianwick.net>
-
8fc4b59b
by Pekka Paalanen
at 2020-02-05T11:13:51+00:00
weston-log-flight-rec: allow re-running a compositor
weston_primary_flight_recorder_ring_buffer needs to be cleared on destruction
of the subscriber it was assigned from so that a compositor and be re-executed
in-process (static variables do not get re-initialized automatically).
This will be used by the test harness when it will execute wet_main() multiple
times in the same process. Otherwise it would hit the assert in
weston_log_subscriber_create_flight_rec().
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
007ab1e5
by Pekka Paalanen
at 2020-02-05T11:13:51+00:00
tests: add range argument for fuzzy image matching
The fuzzy range will be used with GL-renderer testing, as it may produce
slightly different images than Pixman-renderer yet still correct results.
Such allowed differences are due to different rounding.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
1618697d
by Pekka Paalanen
at 2020-02-05T11:13:51+00:00
build: add test-gl-renderer option
This shall be used by CI due to https://gitlab.freedesktop.org/mesa/mesa/issues/2219
It defaults to true, meaning that people by default will be running the
GL-renderer tests. It works fine on hardware drivers, just not llvmpipe.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
1eae5471
by Pekka Paalanen
at 2020-02-05T11:13:51+00:00
CI: do not attempt to test GL-renderer
Because of https://gitlab.freedesktop.org/mesa/mesa/issues/2219 it would crash,
so disable GL-renderer.
https://gitlab.freedesktop.org/wayland/weston/issues/358 shall revert this.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
741fca40
by Pekka Paalanen
at 2020-02-05T11:13:51+00:00
tests: run subsurface-shot on GL too
This adds the necessary fuzz to image matching to let GL-renderer pass.
The difference is due to rounding. weston-test-desktop-shell.c uses
weston_surface_set_color(dts->background_surface, 0.16, 0.32, 0.48, 1.);
to set the background color. Pixman-renderer will truncate those to uint8, but
GL-renderer seems to round instead, which causes the +1 in background color
channel values.
0.16 * 255 = 40.8
0.32 * 255 = 81.6
0.48 * 255 = 122.4
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
4b1de011
by Philipp Zabel
at 2020-02-06T09:00:42+00:00
build: add rpath to modules that use symbols from libexec_weston
The cms-static, desktop-shell, hmi-controller, ivi-shell, and screen-share
modules use symbols from libexec_weston, e.g.:
$ ldd /usr/lib/x86_64-linux-gnu/weston/desktop-shell.so | grep "not found"
libexec_weston.so.0 => not found
Loading these modules from weston happens to work because the weston executable
itself links against libexec_weston, and has an rpath set. Still, these modules
depend on a library in a non-standard location. Adding an rpath could help
static checkers to make sure all shared objects' dependencies are present..
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-
8c02ea10
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
weston-log: rename weston_log_subscriber::destroy to destroy_subscription
weston_log_subscriber has a member named destroy. There are
other structs (weston_output, for instance) that have this
member, and by convention it is a pointer to a function
that destroys the struct.
In weston_log_subscriber it is being used to destroy
subscriptions of the debug protocol, and not the subscriber,
so this name is misleading. Rename it to destroy_subscription.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
1ded661a
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
weston-log: merge functions that destroy different types of subscribers
Log subscriber API is not type-safe. File and flight recorder
subscribers are created with functions that return
weston_log_subscriber objects. But there's a problem: to destroy
these objects you have to call the right function for each type
of subscriber, and a user calling the wrong destroy function
wouldn't get a warning.
Merge functions that destroy different types of subscribers, making
the log subscriber API type-safe.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
23491cd9
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
weston-log: destroy subscriptions with destruction of subscribers
The subscription is directly related to both the log scope and
the subscriber. It makes no sense to destroy one of them and
keep the subscriptions living.
We only had code to destroy subscription with
the destruction of log scopes. Add code to destroy
subscriptions with destruction of subscribers.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
97d2d699
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
weston-log: share code between weston_log_scope_destroy() and weston_log_subscriber_release()
Both weston_log_scope_destroy() and weston_log_subscriber_release()
have calls for destroy_subscription(). We can move this call to
weston_log_subscription_destroy() without losing anything and
avoiding repetition.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
9aaaf96a
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
compositor: destroy log context only after the destruction of subscribers
Before commit "weston-log: destroy subscriptions with
destruction of subscribers", we had to destroy subscribers
before the log context. Currently there's no required order,
both are valid.
But since we've created log context before the subscribers,
we can destroy it after them. This is a style change and
also a prove that now this order is valid as well.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
d65483ec
by Leandro Ribeiro
at 2020-02-10T10:53:50+00:00
weston-log-wayland: make stream_destroy() use weston_log_subscriber_release()
Make stream_destroy() use weston_log_subscriber_release().
This avoids code duplication and allow us to destroy
weston_log_subscriber_get_only_subscription(), since it's
being used only in this case and it's internal.
Calls for weson_log_subscriber_release() leads to
weston_log_debug_wayland_to_destroy(), which should not
send an error event when the stream has already been closed.
Also, stream_destroy() shouldn't lead to an event error, as
it is a wl_resource destroy handler. So close the stream before
calling weston_log_subscriber_release() in stream_destroy()
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
7d61a2c8
by Héctor Orón Martínez
at 2020-02-10T12:24:25+01:00
Release Debian version 8.0.0-1
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
804ed5d0
by Héctor Orón Martínez
at 2020-02-10T14:27:58+01:00
Release Debian version 8.0.0-1~exp1
It has to go through NEW queue with binaries included
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
598d3a15
by Simon Ser
at 2020-02-10T15:49:20+01:00
clients/window: fail earlier when frame_create fails
This adds a new NULL check to fail earlier when frame_create fails. This can
happen because PNG files couldn't be loaded from the data directory.
Signed-off-by: Simon Ser <contact@emersion.fr>
-
dddb592c
by Scott Anderson
at 2020-02-18T17:38:27+13:00
gl-renderer: Move EGL client extension handling earlier
EGL client extensions are not tied to the EGLDisplay we create, and have
an effect on how we create the EGLDisplay. Since we're using this to
look for EGL_EXT_platform_base, it makes more sense for this to be near
the start of the GL renderer initialization.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
77254154
by Scott Anderson
at 2020-02-18T17:41:06+13:00
gl-renderer: Move get_platform_display to EGL client setup
This is to put more of the EGL client extension handling in the same
place. This also adds a boolean to check if EGL_EXT_platform_base is
supported, similar to other extensions we check.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
4ed58b1d
by Scott Anderson
at 2020-02-18T18:06:52+13:00
gl-renderer: Move platform extension checks to EGL client setup
This removes the duplicate checks for EGL_EXT_platform_base.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
4ed62d47
by Scott Anderson
at 2020-02-18T18:11:26+13:00
gl-renderer: Move EGL display creation to egl-glue.c
It makes more sense for it to be there instead.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
8bd46c75
by Pekka Paalanen
at 2020-02-18T15:24:38+02:00
CI: build a Mesa shapshot for getImage/putImage on pbuffer swrast
https://gitlab.freedesktop.org/mesa/mesa/commit/c7617d8908a970124321ce731b43d5996c3c5775
is necessary for running GL-renderer with llvmpipe in Gitlab CI.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
ea3b7857
by Pekka Paalanen
at 2020-02-18T15:24:38+02:00
Revert "CI: do not attempt to test GL-renderer"
This reverts commit 1eae54714fd2ae38756b24ddc58a7d55bec5d14d.
We install a fixed Mesa into the CI image, so these tests can pass now.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/358
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
401b8767
by ahe
at 2020-02-26T14:19:21+01:00
fullscreen-shell/fullscreen-shell.c: prevent seat_created() from being called with l == NULL
-
9cb81e44
by Veeresh Kadasani
at 2020-02-26T15:06:46+00:00
ivi-application: fix grammar
Signed-off-by: Veeresh Kadasani <external.vkadasani@jp.adit-jv.com>
-
8555877c
by Pekka Paalanen
at 2020-02-27T11:08:48+00:00
clients: transformed does not recognize -d
It has no such command line option.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
0df44779
by Pekka Paalanen
at 2020-02-27T11:08:48+00:00
libweston: document weston_transformed_*()
Clarifies which direction the transformation happens. All exported function
need documentation.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
8060d826
by Pekka Paalanen
at 2020-02-27T11:08:48+00:00
Redefine output rotations
It was discovered in issue #99 that the implementations of the 90 and 270
degree rotations were actually the inverse of what the Wayland specification
spelled out. This patch fixes the libweston implementation to follow the
specification.
As a result, the behaviour of the the weston.ini transform key also changes. To
force all users to re-think their configuration, the transform key values are
also changed. Since Weston and libweston change their behaviour, the handling
of clients' buffer transform changes too.
All the functions had their 90/270 cases simply swapped, probably due to
confusion of whether WL_OUTPUT_TRANSFORM_* refers to rotating the monitor or
the content.
Hint: a key to understanding weston_matrix_rotate_xy(m, c, s) is that the
rotation matrix is formed as
c -s
s c
that is, it's column-major. This fooled me at first.
Fixing window.c fixes weston-terminal and weston-transformed.
In simple-damage, window_get_transformed_ball() is fixed to follow the proper
transform definitions, but the fix to the viewport path in redraw() is purely
mechanical. The viewport path looks broken to me in the presence of any
transform, but it is not this patch's job to fix it.
Screen-share fix just repeats the general code fix pattern, I did not even try
to understand that bit.
https://gitlab.freedesktop.org/wayland/weston/issues/99
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
9b682302
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: move check_screen() into client helpers
This will be useful in more tests.
No changes to the code, aside from dropping one 'static'.
Copyright 2017 is taken from git-blame of the moved code.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
7009806b
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: rename check_screen() to verify_screen_content() + doc
The old name felt too... short.
The return type is changed to bool; fits better for a success/failure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
636fc15f
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: allow verify_screen_content() w/o ref image
Allow the reference image to be NULL or missing so that it does not even
attempt to load a reference image or compare it. You cannot just point the
reference image to an arbitrary image because the comparison functions can
abort due to size mismatch. This makes bootstrapping new tests easier when you
do not yet have a reference image.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
dd84ecf4
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
compositor: add scale cmdline option for headless
The test suite wants to start using different output scales, and this is the
easiest API to configure it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
0ce5a19b
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: add scale and transform compositor options
With these, a test can initialize the headless-backend with non-default scale
and transform which allows testing output scales and transforms.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
1eb30468
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: add get_test_fixture_index()
A future test wants to access the fixture data array for the currently running
fixture index to log the test description. This patch provides access to the
array index.
Rather than adding more gloabl variables, I changed the type of the existing
one which feels slightly cleaner.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
444f1a8e
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: re-order test naming pattern
The string from get_test_name() can be used for writing screenshot files and
others. Starting the name with the fixture number makes an alphabetized listing
of output files look unorganized.
Let's change the test name to begin with the test (source) name with fixture
and element numbers as suffixes. That makes a file listing easier to look
through, when you have multiple tests each saving multiple screenshot files.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
080d85b8
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: implement client_destroy()
It turns out that if the client is not explicitly destroyed, it will remain
connected until the compositor shuts down because there is no more a client
process that would terminate.
Usually this is not a problem, but if a test file has multiple screenshooting
tests, the windows from earlier tests in the file will remain on screen. That
is not wanted, hence implement client destruction.
To properly destroy a client, we also need a list of outputs. They used to be
simply leaked. This does not fix wl_registry.global_remove for wl_outputs, that
is left for a time when a test will actually need that.
This patch makes only ivi-shell-app test use the new client_destroy() to show
that it actually works. The added log scopes prove it: destroy requests get
sent. Sprinkling client_destroy() around in all other tests is left for a time
when it is actually necessary.
ivi-shell-app is a nicely simple test doing little else, hence I picked it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
20026a55
by Pekka Paalanen
at 2020-02-27T16:08:42+02:00
tests: expand allowed pixel fuzz for GL
Running with Mesa 20.1.0-devel (git-c7617d8908) GL renderer:
Radeon RX 550 Series (POLARIS11, DRM 3.27.0, 4.19.0-2-amd64, LLVM 8.0.1)
I found output-tranform test (a future patch) to produce exactly this much more
difference between Pixman and GL rendererers.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
97359ba5
by Pekka Paalanen
at 2020-02-28T15:07:51+02:00
tests: add output transform tests
This goes through all output transforms with two different buffer transforms
and verifies the visual output against reference images.
This commit introduces a new test input image 'basic-test-card.png'. It is a
small image with deliberately odd and indivisible dimensions to provoke bad
assumptions about image sizes. It contains red, green and blue areas which are
actually text that makes it very obvious if you have e.g. color channels
swapped. It has a white thick circle to highlight aspect ratio issues, and an
orange cross to show a mixed color. The white border is for contrast and a 1px
wide detail. The whole design makes it clear if the image happens to be rotated
or flipped in any way.
The image has one pixel wide transparent border so that bilinear sampling
filter near the edges of the image would produce the same colors with both
Pixman- and GL-renderers which handle the out-of-image samples fundamentally
differently: Pixman assumes (0, 0, 0, 0) samples outside of the image, while
GL-renderer clamps sample coordinates to the edge essentially repeating the
edge pixels.
It would have been "easy" to create a full matrix of
every output scale & transform x every buffer scale & transform, but that
would have resulted in 2 renderers * 8 output transforms * 3 output scales *
8 buffer transforms * 3 buffer scales = 1152 test cases that would have all
ran strictly serially because our test harness has no parallelism inside one
test program. That would have been slow to run, and need a lot more reference
images too.
Instead, I chose to iterate separately through all output scales & transforms
(this patch) and all buffer scales & transforms (next patch). This limits the
number of test cases in this patch to 56, and allows the two test programs to
run in parallel.
I did not even pick all possible scale & transform combinations here, but just
what I think is a representative sub-set to hopefully exercise all the code
paths.
https://gitlab.freedesktop.org/wayland/weston/issues/52
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
147e67c4
by Pekka Paalanen
at 2020-02-28T16:02:10+02:00
tests: add buffer transform tests
This patch continues the buffer and output transforms testing by iterating
through a representative selection of buffer transforms and scales.
For more details, see the previous patch "tests: add output transform tests".
https://gitlab.freedesktop.org/wayland/weston/issues/52
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
7f42b350
by Guillaume Champagne
at 2020-03-05T14:43:58+00:00
backend-rdp: fix unresolved symbols errors
The RDP backend uses functions defined by the Windows Portable Runtime
library (WinPR). The library's code is contained within FreeRDP
repository, but it is packaged as its own library (seperate pkg-config
file).
WinPR is added as a dependency to the RDP backend. The version 2.0 is
choosen as the version to on since the backend depends on FreeRDP 2.0.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
467e6b98
by Guillaume Champagne
at 2020-03-05T14:43:58+00:00
backend-rdp: enable undefined functions errors.
b_lundef was overriden for the RDP backend since it triggered linking
errors due to functions that were defined in a missing dependency. This
issue was fixed, so the override is removed. The global project's
linker parameters are now applied to the RDP backend.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
31af69d8
by Daniel Stone
at 2020-03-06T21:47:51+00:00
compositor: Fix default transforms when output section declared
Regardless of the default transform passed in, weston_parse_transform
would always return 'normal' if there was an output section. This is
because, if a section was declared for that output, it would ask
weston_config for the transform, with the default being 'normal'.
Fix it so we return the passed-in default transform when we have a
matching output section without a transform key. If the transform is
declared but invalid, we can remove the line resetting to the default
transform, because we've already set the default transform up top.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
aaf35586
by Daniel Stone
at 2020-03-06T21:50:38+00:00
compositor: Fail output configuration on invalid transform
If an invalid transformation is provided for an output, fail the output
configuration rather than continuing on using whatever we chose as the
default transform.
After !383, this will result in configurations using the old definition
failing and exiting, rather than continuing on the wrong way around.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
a69cb711
by Lucas Stach
at 2020-03-06T21:50:38+00:00
libweston: Add transform to weston_head
Like physical size, subpixel arrangement, etc, transform advises of a
physical transform of a head, if present.
This commit adds the transform member and setter to weston_head, however
it is currently unused.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
[daniels: Extracted from one of Lucas's patches.]
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
72e7a1ed
by Lucas Stach
at 2020-03-06T21:50:38+00:00
backend-drm: Parse KMS panel orientation property, apply to weston_head
The KMS 'panel orientation' property allows the driver to statically
declare a fixed rotation of an output device. Now that weston_head has a
transform member, plumb the KMS property through to weston_head so the
compositor can make a smarter choice out of the box.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
[daniels: Extracted from one of Lucas's patches]
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
1c0507b1
by Daniel Stone
at 2020-03-06T21:50:38+00:00
compositor: Use weston_head transform for output default
If the output only has a single weston_head attached to it, take its
declared transform as the default transform.
With the previous patches, this allows a device declaring the KMS 'panel
orientation' property (e.g. through DeviceTree) to autoconfigure to the
correct display rotation when running Weston.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
536873c5
by Pekka Paalanen
at 2020-03-10T13:40:00+00:00
tests: print image difference statistics
When a test fails and it produces a difference image, also compute the min/max
per-channel signed difference statistics. These numbers can be used to adjust
the fuzz needed for fuzzy_match_pixels() to pass. Otherwise one would have to
manually inspect the reference and result images and figure out the values.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
5450456d
by Daniel Stone
at 2020-03-11T10:38:08+00:00
compositor: Fail on invalid transform for headless
As in aaf35586f471, we want to fail when we are passed an invalid
transform name, not just blindly configure on using the normal
transform. The previous commit missed the callsite from the headless
backend's command-line parsing.
Fix this so that headless fails when an invalid transform is specified
on the command line.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
9f53edd4
by Pekka Paalanen
at 2020-03-11T15:57:45+02:00
pixman-renderer: half-fix bilinear sampling on edges
When weston-desktop-shell uses a solid color for the wallpaper, it creates a
1x1 buffer and uses wp_viewport to scale that up to fullscreen. It's a very
nice memory saving optimization.
If you also have output scale != buffer scale, it means pixman-renderer chooses
bilinear filter. Arguably pixman-renderer should choose bilinear filter also
when wp_viewport implies scaling, but it does not. As w-d-s always sets buffer
scale from output scale, triggering the bilinear filter needs some effort..
What happens when you sample with bilinear filter from a 1x1 buffer, stretching
it to cover a big area? Depends on the repeat mode. The default repeat mode is
NONE, which means that samples outside of the buffer come out as (0,0,0,0).
Bilinear filter makes it so that every sampling point on the 1x1 buffer except
the very center is actually a mixture of the pixel value and (0,0,0,0). The
resulting color is no longer opaque, but the renderer and damage tracking
assume it is. This leads to the issue 373.
Fix half of the issue by using repeat mode PAD which corresponds to OpenGL
CLAMP_TO_EDGE. GL-renderer already uses CLAMP_TO_EDGE always.
This is only a half-fix, because composite_clipped() cannot actually be fixed.
It relies on repeat mode NONE to work. It would need a whole different approach
to rendering potentially non-axis-aligned regions exactly like GL-renderer.
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/373
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
9c267e5b
by Pekka Paalanen
at 2020-03-11T17:11:03+02:00
tests: move viewport creation into helpers
There will be a new test program using viewports and would like to share this
bit of code.
There are two behavioral changes:
- Compositor wp_viewporter interface version is no longer checked.
- client_create_viewport() does not leak the viewporter object.
test_viewporter_double_create needs to call bind_to_singleton_global() itself
so that the viewporter object still exists when the error event arrives.
Otherwise error verification fails.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
f26d17fe
by Pekka Paalanen
at 2020-03-11T17:24:47+02:00
tests: move fill_color into helpers
There will be a new test program that wants to share this code.
No behavioral changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
4505f811
by Pekka Paalanen
at 2020-03-12T13:22:06+02:00
tests: add viewport test for repeat mode
This test ensures that
"pixman-renderer: half-fix bilinear sampling on edges"
keeps on working.
Unlike in the original report
https://gitlab.freedesktop.org/wayland/weston/issues/373, here we use buffer
scale 2 instead of output scale 2 to trigger bilinear filter. The effect is the
same, the actual resulting image in the failing case is just a little
different. This is so that it will be easy to add more viewport screenshooting
tests in this program in the future.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
cb481a66
by Daniel Stone
at 2020-03-18T11:33:52+00:00
wayland-backend: Fully damage initial SHM buffer
In order to start the repaint loop, the Wayland backend tries to damage
the full SHM buffer, but doesn't actually damage the full area if we
have a frame.
Store the buffer's width and height alongside the buffer itself, so we
can damage the full area when required.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
24c0f837
by Daniel Stone
at 2020-03-20T15:02:14+00:00
xdg-shell: More helpful surface-state-mismatch error
When libweston-desktop kills an xdg-shell client because it has failed
to configure its surface as demanded, be more helpful by explaining
exactly what the error is.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
76932e6b
by Daniel Stone
at 2020-03-20T15:25:24+00:00
x11: Remove unnecessary NULL checks
Output and mode can never be NULL.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
7fa97e66
by Daniel Stone
at 2020-03-20T15:25:24+00:00
drm: Remove trailing whitespace
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
98d75e1b
by Daniel Stone
at 2020-03-20T15:25:24+00:00
drm: Remove unnecessary condition in drm_output_render reuse
This condition inside drm_output_render() checks if we can reuse the
existing renderer buffer for the primary plane; this occurs in
mixed-mode composition where a client buffer promoted to a plane has
changed, but the primary plane is unchanged.
We accomplish this by checking if there is no damage on the
primary/renderer plane, and then if there is already a renderer buffer
active on the primary plane: in that case, we can reuse the buffer we
already have.
There was a further condition checking if the width and height were
identical. This was designed to prevent against issues on mode changes.
However, runtime mode changes are already quite broken, and a mode
change will also cause damage on the full plane. We can simply remove
this condition.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
f9a61625
by Daniel Stone
at 2020-03-20T15:25:24+00:00
drm: Get renderer buffer size from drm_fb
The renderer buffer size is usually the same size as the current mode,
so we were taking the dimensions from the currently-set mode. However,
using current_mode is quite confusing in places when it comes to scale,
and it also hampers our ability to do mode switches, as well as to
introduce a future option which will let the renderer use a smaller
buffer than the output and display scaled.
Simply take the dimensions of the renderer's output buffer from the
buffer itself.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
c890c384
by Daniel Stone
at 2020-03-20T15:25:24+00:00
gl-renderer: Replace display-create args with struct
gl_rendererer's output_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
db6e6e1e
by Daniel Stone
at 2020-03-20T15:25:24+00:00
gl-renderer: Replace window-create args with struct
gl_rendererer's output_window_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
786490cb
by Daniel Stone
at 2020-03-20T15:25:24+00:00
gl-renderer: Replace pbuffer-create args with struct
gl_rendererer's output_pbuffer_create has a lot of arguments now. Add a
structure for the options to make it more clear what is what.
This is in preparation for adding bare-integer arguments which are ripe
for confusion when passing positional arguments.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
61abf35e
by Daniel Stone
at 2020-03-20T15:25:24+00:00
pixman-renderer: Replace output-create flags with struct
pixman_renderer_output_create currently takes a flags enum bitmask for
its options. Switch this to using a structure, so we can introduce other
non-boolean options.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-
51048463
by Tomohito Esaki
at 2020-03-30T17:43:20+09:00
drm: change timing to set color format for primary plane without universal plane
Without universal plane, the weston crashes with null pointer access in
set_gbm_format function because that function called before output
enable function. By changing timing to set color format for primary
plane in this case, this issue fixes.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
-
bac1a7a7
by Paul Menzel
at 2020-04-06T10:35:17+02:00
man/weston-drm: Use third person singular conjugation
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
-
ef5f3233
by Michael Olbrich
at 2020-04-29T09:17:19+02:00
compositor: fix endless recursion in scene-graph printing
If a surface has subsurfaces then the surface itself is in the subsurface
list. To avoid printing it again there is a check to skip the child view,
if it is the same as the current view.
However, this fails when a surface with subsurfaces has two (or more) views:
The check to skip the parent fails for the other view and the two views are
printed again and again until a stack overflow occurs.
So instead check if the parent view of the subsurface view is the current
view. This way, any view that does not belong to a real subsurface is
skipped.
As a side effect, this ensures that each view of the subsurfaces is only
printed once at the correct place in the hierarchy.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
753bdfc1
by Peter Hutterer
at 2020-05-08T07:26:01+10:00
gitlab ci: switch to freedesktop ci-templates
The project was moved a while ago to make it look less waylandy. Same
sha, so no actual changes here.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
3002a381
by Peter Hutterer
at 2020-05-08T07:34:28+10:00
gitlab CI: update to recent fdo ci-templates
Make use of the templating structure the templates provide. No
functional changes in the end, container-build's default behavior is the
previously called container-if-not-exists template.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
6b64d39a
by Ken C
at 2020-05-12T07:30:20+00:00
set SURFACE_BITS_COMMAND cmdType explicitly
-
a2086bba
by Peter Hutterer
at 2020-05-14T11:49:54+10:00
libweston: replace 0 with the enum value for the xkb init flags
No functional changes, this is cosmetics only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-
f6bd2129
by Alexandros Frantzis
at 2020-05-25T10:11:09+00:00
xdg-shell: Allow fullscreen surfaces to not cover the whole screen
The wording of the xdg-shell protocol allows surfaces to not cover the
whole screen when they are made fullscreen. From the description of the
fullscreen state in xdg-shell:
The window geometry specified in the configure event is a maximum; the
client cannot resize beyond it. For a surface to cover the whole
fullscreened area, the geometry dimensions must be obeyed by the
client.
The last sentence is the condition for fullscreen coverage, not a
requirement.
This commit updates the code to not flag size mismatches for fullscreen
surfaces as a protocol error when the surface fits within the screen. In
such cases, the shell is responsible for centering surfaces
appropriately and also for obscuring other screen content as described
in the xdg_toplevel.set_fullscreen request description (and, indeed,
desktop-shell does all this).
For reference, contrast with the corresponding, stricter wording in the
obsolete xdg-shell-unstable-v6 protocol for the fullscreen state:
The window geometry specified in the configure event must be obeyed by
the client.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
40c519a3
by Michael Olbrich
at 2020-05-25T11:06:28+00:00
gl-renderer: query EGL to determine if GL_TEXTURE_EXTERNAL_OES should be used
Using the number of planes to determine if GL_TEXTURE_EXTERNAL_OES should be
used is incorrect with some modifiers: For example RGBA with a
I915_FORMAT_MOD_Y_TILED_CCS modifier has two planes.
Use eglQueryDmaBufModifiersEXT() to query if the current format/modifier only
supports GL_TEXTURE_EXTERNAL_OES.
Use the current code as fallback of modifiers are not supported.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
50aa3a76
by Pekka Paalanen
at 2020-05-28T16:34:48+03:00
timeline: convert vblank timestamp to MONOTONIC
All timeline event timestamps are in CLOCK_MONOTONIC already. DRM KMS
timestamps are practically guaranteed to be CLOCK_MONOTONIC too, even though
presentation clock could theoretically be something else. For other backends,
the presentation clock is likely CLOCK_MONOTONIC_RAW due to
weston_compositor_set_presentation_clock_software().
This patch ensures that the recorded vblank timestamp is in CLOCK_MONOTONIC.
Otherwise interpreting the timeline traces might be difficult to do accurately,
since it would be hard to recover the relationship between the presentation
clock and timeline event timestamps.
The time conversion routine is the simplest possible, I don't think we need any
more accurate conversion for timeline purposes. Besides, DRM-backend is the
only backend where the timings actually matter, the other backends are
software-timed anyway.
Since the clock domain of the "vblank" attribute potentially changes, the
attribute is renamed. Wesgr never used this attribute.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
fdc9b4bc
by Antonio Caggiano
at 2020-06-01T18:03:33+00:00
compositor: Print error opening log file
When failing to open the log file nothing is reported to the user,
therefore we print a message on stderr when that happens.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
2eda978e
by Antonio Caggiano
at 2020-06-01T18:03:33+00:00
compositor: Quit when failing to open log file
If users ask explicitly to log to a file, it makes sense to quit
when we fail opening that file. Continuing execution would mean
wasting users' time if they expect to find the log file at the
end of the session.
Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-
e8033e3d
by Leandro Ribeiro
at 2020-06-02T13:47:15+00:00
tests: don't use width and height for drm/fbdev backend tests
In the test suite we have some default options which
are command line arguments used by most of the tests.
Two of these are width==320 and height==240. But
when we have DRM or fbdev backends, width and height
are not possible command line arguments. This makes
impossible to run tests that uses one of these types
of backends, as the compositor won't open if the
command line string is wrong.
Fix this by not passing command line arguments width
and height if the backend is DRM or fbdev.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
7b37b4d3
by Leandro Ribeiro
at 2020-06-02T13:47:15+00:00
tests: properly select renderer for DRM-backend
The test suite is dealing only with headless-backend tests.
In order to make it able to run DRM-backend tests, we have
to properly select the renderer that it will use.
This patch add the command line option --use-pixman if the test
defines the DRM-backend renderer as RENDERER_PIXMAN, and it will
add nothing to the command line if it defines RENDERER_GL (the
DRM-backend default renderer is already GL). Also, if the user
defines the DRM-backend renderer as RENDERER_NOOP, the test will
fail (as it should, since DRM-backend does not implement it).
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
e57d8ae8
by Leandro Ribeiro
at 2020-06-02T13:47:15+00:00
drm-backend: add --continue-without-input command line option to DRM-backend
In the test suite we may want to run a DRM-backend test on a
non-default seat, which may not have a input device associated.
Weston's default behavior is to not open if input devices are
not found, as it may cause troubles. For instance, Weston can
open but if no input device is set than the user can not
interact or leave it.
Add flag --continue-without-input to DRM-backend so we can run
these types of tests with no input. Notice that this won't force
the compositor to skip opening a input device if it finds it on
the non-default seat.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
e8a8c13e
by Leandro Ribeiro
at 2020-06-02T13:47:15+00:00
tests: add support to run drm-backend tests locally
With this patch we add support to run DRM-backend tests locally
in the test suite. For now this won't work in the CI, as there
are no cards available. But the plan is to achieve this by using
VKMS (virtual KMS) in the future.
To run DRM-backend tests locally, first of all the user has to
set the environment variable WESTON_TEST_SUITE_DRM_DEVICE to
'card0', 'card1' or any other device where he wants to run
the tests. Also, for now it only works if it is run as root,
but in the future this problem will be solved.
The tests will run on a non-default seat. The reason for that
is that we want to avoid opening input devices unnecessarily.
Also, since DRM-backend usage requires gaining DRM master status
on a DRM KMS device, nothing else must be using the device at
the same time. To achieve this we use a lock to run the
DRM-backend tests sequentially.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
b1c529e9
by Leandro Ribeiro
at 2020-06-02T13:47:15+00:00
tests: add drm-backend smoke test
This adds the first DRM-backend test. It is very simple
and was made in order to make easier to add more complex
DRM-backend tests in the future.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
7451f995
by Guillaume Champagne
at 2020-06-03T11:00:21+00:00
meson: add lcms2 dependency to cms-colord
cms-colord uses cms-helper functions which require lcms2. Therefore,
lcms2 must be added as a build dependency.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
478710c0
by Guillaume Champagne
at 2020-06-03T11:00:21+00:00
meson: enable undefined functions errors for colord
The missing build dependency was added. The override to disable this
check can be removed.
Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
-
15c603ca
by Scott Anderson
at 2020-06-04T09:52:16+00:00
drm: Fix leak of damage blob id
This moves the creation of the blob to be earlier, to when the damage is
calculated. It replaces the damage tracked inside of the plane state
with the blob id itself.
This should stop creating new blob ids for TEST_ONLY commits, and them
being leaked in general, as the blob ids are now freed with the plane
state.
The FB_DAMAGE_CLIPS property is now always set if it's supported, and
will be 0 in the case that we have no damage information, which
signifies full damage to the kernel.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
-
ba548311
by Tomek Bury
at 2020-06-11T10:52:22+01:00
gl-renderer: fix pbuffer surface creation
When there's neither configless nor surfaceless EGL extension
(i.e. not a Mesa driver), Weston falls back to a dummy pbuffer surface.
Weston attempts to find for that surface an EGL config but uses a NULL
array of pixel formats. This fails with the following messages:
EGL_KHR_surfaceless_context unavailable. Trying PbufferSurface
Found an EGLConfig matching { pbf; } but it is not usable because
neither EGL_KHR_no_config_context nor EGL_MESA_configless_context
are supported by EGL.
failed to choose EGL config for PbufferSurface
EGL error state: EGL_SUCCESS (0x3000)
Failed to initialise the GL renderer;
Signed-off-by: Tomek Bury <tomek.bury@broadcom.com>
-
c8feaae7
by James Hilliard
at 2020-06-12T09:23:11+00:00
libweston: don't clean up surface role
Surface roles are permanent, so it should not be cleaned up.
Fixes: #409
weston: ../libweston/compositor.c:4094: weston_surface_set_role: Assertion `role_name' failed.
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
-
6ebda36a
by Marius Vlad
at 2020-06-23T10:36:47+00:00
desktop-shell: Avoid retrieving output's width/height if none present
As in some circumstances there could be no output connected, avoid
retrieving the width/height of the output if none was found/connected.
Fixes: #384
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
77d06f7b
by Frank Binns
at 2020-06-24T11:11:31+01:00
shared: fix unused variable warning
Fix the following build warning by moving the 'seals' declaration inside the
HAVE_MEMFD_CREATE guard:
../shared/os-compatibility.c: In function ‘os_ro_anonymous_file_get_fd’:
../shared/os-compatibility.c:341:6: warning: unused variable ‘seals’ [-Wunused-variable]
int seals, fd;
^
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
-
887a7e57
by Leandro Ribeiro
at 2020-06-25T10:17:31+00:00
launcher: do not touch VT/tty while using non-default seat
Launcher-direct does not allow us to run using a different
seat from the default seat0. This happens because VTs are
only exposed to the default seat, and users that are on
non-default seat should not touch VTs.
Add check in launcher-direct to skip VT/tty management if user
is running on a non-default seat.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
a12ba0b3
by Leandro Ribeiro
at 2020-06-25T10:17:31+00:00
gitlab CI: add support for DRM-backend tests
In order to run DRM-backend tests, a DRM-device is needed. As we
do not necessarily have control of the hardware that is going to
run our tests in GitLab CI, DRM-backend tests were being skipped.
This patch add support to run the tests using VKMS (virtual KMS).
To achieve this, virtualization is needed, as we need to run a
custom kernel during the CI job. We've decided to go with virtme,
as it is simpler to setup and works good for our use case.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
e55c86a1
by Jimmy Ohn
at 2020-07-01T18:58:38+09:00
screen-share: don't get weston_config object before zalloc
we don't need to get the weston_config object before zalloc success.
-
f7f8f5f1
by Jimmy Ohn
at 2020-07-01T19:16:13+09:00
xwayland/window-manager: add a NULL check to fail when frame_create fails
This adds a NULL check to fail when frame_create fails. This can happen
crash in frame_resize_inside function if frame is NULL.
-
c46c70da
by Kirill Chibisov
at 2020-07-09T17:47:11+03:00
libweston: Send wl_keyboard.modifiers after wl_keyboard.enter
The core Wayland protocol explicitly states that wl_keyboard.modifiers
must be send after wl_keyboard.enter.
This commit also changes the behavior of `seat_get_keyboard` to not
send `wl_keyboard.modifiers` in case where seat had pointer focus,
but not keyboard one.
Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
-
ea4d13b3
by Leandro Ribeiro
at 2020-07-28T11:13:53-03:00
drm-backend: remove log that advertises universal planes support
There's a log that advertises support for universal planes. That
can make users think there's something wrong with Weston or their
systems when universal planes are not supported, but that's not
the case. Remove this log from the code.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-
87c1679a
by Alexandros Frantzis
at 2020-07-30T14:38:49+00:00
kiosk-shell: Introduce kiosk/fullscreen shell for desktop apps
kiosk-shell is fullscreen shell for apps that use the xdg-shell
protocol. The goal is to make life easier for people shipping embedded
devices with simple fullscreen shell requirements, and reduce the
proliferation of desktop-shell hacks.
Top level surfaces are made fullscreen, whereas dialogs are placed on
top in the center of the output and retain their natural sizes. Dialogs
can be moved and (un)maximized, but resizing is currently not supported.
An app can be directed to a particular output by populating the
"app-ids" field with the app's XDG app id, in the relevant
"[output]" section in the weston config file.
Fixes: #277
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
905ddbb3
by Simon Ser
at 2020-07-30T22:56:04+02:00
build: bump to version 9.0.91 for the alpha release
-
3ac911f6
by Michael Olbrich
at 2020-08-06T10:22:18+02:00
drm: remove duplicate function declarations
These functions are all declared twice in the same file. Remove on of the two
declarations.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
b7e5f10b
by Michael Olbrich
at 2020-08-11T16:41:14+02:00
compositor: use weston_view_is_opaque() to check for opacity in debug_scene_view_print()
Currently the debug output for 'drm-backend' can be confusing. In the output of
debug_scene_view_print() views may be listed as 'not opaque' but later, during
plane assignment, other views underneath such a view is reported as 'occluded on
our output'.
This happens because weston_view_is_opaque() has some extra checks to determine
if a view is fully opaque, such as 'is_opaque' provided by the renderer for
formats that have no alpha channel.
Use weston_view_is_opaque() in debug_scene_view_print() as well to get more
accurate results.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
c5ea495f
by Michael Olbrich
at 2020-08-12T11:03:43+00:00
compositor: ignore views on other outputs during compositor_accumulate_damage()
compositor_accumulate_damage() is called for each output during repaint.
The DRM backend will only set keep_buffer for the surfaces that are visible on
the current output. So a buffer_ref is released that may still be needed. When
the output that shows the surface is repainted, the buffer_ref is gone and the
surface cannot be put on a plane.
Ignore all surfaces that are not visible on the current output to avoid this.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
ad41ad96
by Michael Olbrich
at 2020-08-13T18:50:57+00:00
gl-renderer: remove incorrect assertion
The refcount is not zero if the corresponding buffer is attached to multiple
surfaces.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
06d51cc4
by Simon Ser
at 2020-08-13T21:09:40+02:00
build: bump to version 8.0.92 for the beta release
-
c1e7151e
by ganjing
at 2020-08-14T02:00:25+00:00
desktop-shell: check memory allocation in switcher_binding
after calling malloc() , be sure to determine whether the allocating for memory space is successful
Signed-off-by: ganjing <ganjing@uniontech.com>
-
85382d39
by Olivier Fourdan
at 2020-08-14T10:31:49+00:00
clients: deprecate weston-info
weston-info is now deprecated in favor of wayland-info which is part of
wayland-utils.
Add a note to weston-info to inform users that weston-info is deprecated
and will be removed soon.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
-
99751345
by Alexandros Frantzis
at 2020-08-17T09:44:45+00:00
drm: Introduce drm_plane_reset_state() helper function
Introduce a helper function to reset the current state of a drm_plane.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
53a71cb1
by Alexandros Frantzis
at 2020-08-17T09:44:45+00:00
drm: Reset associated universal plane states when finalizing a crtc
When dissociating a universal plane from a crtc, we currently don't
reset the current state of the plane (plane->state_cur). When attempting
to use this plane in the future, we can run into invalid memory accesses
due to left over associations with potentially freed drm backend
objects. This commit resets the state of the scanout and cursor
universal planes associated with a crtc.
The following scenario exhibits the problem:
1. Start a (fullscreen) client that is suitable for and assigned to
the scanout plane. The plane's state_cur->output value is set.
2. Unplug the monitor: the scanout plane is "released" but still
maintains the state_cur->output association.
3. Replug the monitor: the plane is deemed unavailable due to an
existing, albeit invalid, state_cur->output value. Note the memory
errors trying to access the drm_output which was freed at step (2).
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
-
3097acc7
by Michael Olbrich
at 2020-08-17T09:53:38+00:00
backend-drm: reorder plane checks to avoid unnecessary rendering
If a surface is not visible, then is does not matter if the view is on multiple
outputs. It will be skipped anyways when the output is rendered.
So check first if the surface is acually visible on the output before doing any
checks that might force rendering. This avoids unnecessary rendering.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
4a378afa
by Rajendraprasad K J
at 2020-08-17T09:58:23+00:00
ivi-shell: Avoid unnecessary scaling of the view transformation matrix
The opaque region of a weston view is updated only if the alpha value is 1
and the transform matrix is of type WESTON_MATRIX_TRANSFORM_TRANSLATE.
While using ivi-shell, opaque region is never updated, as we are performing
scaling operations to the view transform matrix, even when the scaling
factor is 1 and thereby changing the type to WESTON_MATRIX_TRANSFORM_SCALE.
Perform scaling of the view transformation matrix only when the scaling
factor is non-zero.
Signed-off-by: Rajendraprasad K J <KarammelJayakumar.Rajendraprasad@in.bosch.com>
-
27fb564a
by Michael Olbrich
at 2020-08-17T10:12:54+00:00
backend-drm: build DRM virtual support when the pipewire plugin is enabled
The pipewire plugin uses this API as well, not just the remoting plugin. So
enable it if either is enabled.
And disable pipewire in the no-gl-renderer CI build. The virtual outputs don't
work without it.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
43ebb7e2
by Michael Olbrich
at 2020-08-17T10:12:54+00:00
backend-drm: the GL renderer is a hard requirement for DRM virtual outputs
Building fails without it. So don't just warn about it but fail immediately.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
465ab2cd
by Stefan Agner
at 2020-08-17T10:17:30+00:00
backend-drm: allow to disable GBM modifiers
Allow to disable GBM modifiers at runtime using the environment variable
WESTON_DISABLE_GBM_MODIFIERS.
This can be useful for debugging or when modifiers cause issues, e.g. in
case modifiers use higher memory bandwidth and hence impose a lower
resolution limit as it is the case with Intel Kaby Lake graphics.
Related to: https://gitlab.freedesktop.org/wayland/weston/-/issues/404
Signed-off-by: Stefan Agner <stefan@agner.ch>
-
2592d659
by Andreas Heynig
at 2020-08-17T11:59:39+00:00
libweston/launcher-direct.c: do not fail if already in graphics mode
In case of a crash tty remains in graphic mode. This change allows to restart weston without
taking care of the actual tty mode.
Signed-off-by: ahe <Andreas.Heynig@meetwise.com>
-
5130a8c2
by Marius Vlad
at 2020-08-18T12:59:50+03:00
backend-drm: Correctly tear down the DRM backend
It seem that we skipped to put back in TEXT mode the tty, in case a DRM
device node wasn't present at that time, or it isn't present at all. This
orders the destroy part correctly as to handle that case as well.
As a side effect, as the tty will still be set to GRAPHICS mode we will
require a manual change of the tty number, which might be not possible
on all systems. Properly putting back the tty to TEXT mode should avoid
that, and allows to re-use the same tty no in case the DRM device has
been created at a later point in time.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
d70e712c
by Michael Olbrich
at 2020-08-19T07:35:14+02:00
drm: always check the repaint_status in update_complete
Initially finish_frame() was never called in drm_output_update_complete() for
'dpms_off_pending = true'. This is wrong for repaint_status ==
REPAINT_AWAITING_COMPLETION and that was fixed in
68d49d772cfba6c53033cb009b0f490fd38f24ad ("compositor-drm: run finish_frame when
dpms is turned off in update_complete").
However finish_frame() may now be called for repaint_status !=
REPAINT_AWAITING_COMPLETION, which is not allowed and results in a failed
assertion.
Fix this by checking dpms and repaint_status unconditionally.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
a24a326b
by Michael Olbrich
at 2020-08-19T08:50:45+02:00
pipewire: implement DPMS
Pipewire doesn't need to wait for any hardware. The finish_frame() callback is
just artifically delayed to generate the desired framerate.
So when the DPMS level changes, we can just call finish_frame() immediately if
necessary and cancel the timer.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-
67b382cc
by Marius Vlad
at 2020-08-24T14:19:02+03:00
compositor: Avoid using weston_log() in weston_view_is_opaque()
As from commit b7e5f10bf47, weston_view_is_opaque() is called from
debug_scene_graph_cb(), which on its own represents a (different)
scope. By default, we already have a subscriber for the 'log' scope,
which will cause a harmless, yet spurious, message.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
fd874ff5
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: move constant value calculation out of loop
In exposay_layout(), int pad is being calculated within the
loop. This is unnecessary, as its value is constant. Move it
out of the loop.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
0c59e92f
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
desktop-shell: make get_output_work_area() global
get_output_work_area() can be used by exposay to know the free space
where it can render its surfaces, what avoids overlapping the panel.
Currently this function is declared as static in
desktop-shell/shell.c, so it cannot be used by exposay.
Remove static from get_output_work_area() and add it to shell.h
so it can be used by exposay as well.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
b68454e8
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: do not account panel size to compute exposay area
Commit "desktop-shell: make get_output_work_area() global" allowed
the usage of get_output_work_area() in exposay. This is necessary to
avoid overlapping the panel when rendering exposay's surfaces.
Use get_output_work_area() to not take into account the panel size,
instead of considering that the whole screen is available to
render exposay's surfaces.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
33e29d88
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: make inner border dependent of exposay's surfaces size
We've been using an inner border of fixed size (80px), but this
is dangerous. If you have too many open applications or a small
window, the surface size computed will be negative, crashing
the exposay: "error: weston_view transformation not invertible".
Also, it creates a lot of unnecessary space, making the exposay
unusable when we have a small window or many applications open.
Make inner border to be 10% of surface size and surface size to
be 90% of its original size, avoiding the crashes and making it
more visually pleasant.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
048c6281
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: add margins to centralize exposay
The exposay is being rendered in the top-left corner of the
screen. Add margins to render it in the center, making it
more visually pleasant.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
55b4b47e
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: centralize exposay's surfaces in their own square
Commit "exposay: add margins to centralize exposay" has centralized
the whole exposay, but that's not enough. The internal surfaces of
exposay are not centralized.
Each internal surface of exposay is a square, but most of the windows
are rectangular. Add margin to centralize exposay's surfaces in their
own square.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
82b4d429
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: centralize surfaces of the last row when we don't have enough surfaces
The exposay grid is square, but we don't always have enough surfaces
to fill all the columns of the last row. The code to centralize
the surfaces of the last row is not working.
Fix the code that centralizes the surfaces in the last row, making
it more visually pleasant.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
2ac73a8b
by Leandro Ribeiro
at 2020-08-26T14:10:50+00:00
exposay: delete outer padding from struct exposay_output
After some changes in the exposay layout, the outer padding makes
no sense anymore. It was used to avoid the panel to get overlapped
by the exposay surfaces and to keep distance from the borders
of the window.
Currently, the exposay is centralized and the panel cannot get
overlapped. The outer padding just creates unnecessary unused
space, what makes exposay's surfaces smaller.
Delete outer padding from struct exposay_output.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
-
e0b937af
by Marius Vlad
at 2020-08-27T14:14:27+03:00
remoting: Add DPMS support in remoting pluging
Just like pipewire, add DPMS support in remoting plug-in. Mechanical
change mimicking a24a326bb19ec5.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
380ceee6
by Marius Vlad
at 2020-08-27T14:32:26+03:00
remoting, pipewire: Install pipewire and remoting plug-ins headers
Required for other users of libweston.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
-
13f501c5
by Simon Ser
at 2020-08-27T22:58:53+02:00
build: bump to version 8.0.93 for the RC1 release
-
04d3ae26
by Simon Ser
at 2020-09-04T12:20:00+02:00
build: bump to version 9.0.0 for the official release
-
76eaf24b
by Héctor Orón Martínez
at 2020-09-04T14:25:53+02:00
Merge branch 'upstream-experimental' into debian-experimental
-
d9f4ebc8
by Héctor Orón Martínez
at 2020-09-04T14:26:00+02:00
Prepare new release
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
eb3e658a
by Héctor Orón Martínez
at 2020-09-04T14:26:00+02:00
bump ABI to libweston-9
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
b933ee23
by Héctor Orón Martínez
at 2020-09-04T14:26:00+02:00
debian/libweston-9-0.install: disable pipewire plugin
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
a4ca2edb
by Héctor Orón Martínez
at 2020-09-04T14:26:00+02:00
weston: install kiosk shell
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
f4078e0b
by Héctor Orón Martínez
at 2020-09-04T14:26:00+02:00
debian/libweston-9-0.symbols: update
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
a0319e1c
by Héctor Orón Martínez
at 2020-09-04T14:28:03+02:00
debian/rules: fix broken builds
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
a364d7fa
by Héctor Orón Martínez
at 2020-09-04T14:28:03+02:00
Release Debian version 9.0.0-1~exp1
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
5c2bac2f
by Héctor Orón Martínez
at 2020-09-11T12:53:33+02:00
Merge branch 'debian-experimental' into debian-unstable
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>
-
9cc9bf8a
by Héctor Orón Martínez
at 2020-09-11T12:57:32+02:00
Release Debian version 9.0.0-1
Signed-off-by: Héctor Orón Martínez <zumbi@debian.org>