Greg V [Thu, 13 Dec 2018 20:20:16 +0000 (23:20 +0300)]
build: add missing wayland-client dep in meson
Tests library requires Wayland headers to build.
Signed-off-by: Greg V <greg@unrelenting.technology>
Greg V [Thu, 13 Dec 2018 20:17:48 +0000 (23:17 +0300)]
build: use '-Wl,' wrapper for the -export-dynamic linker flag
Meson links with the C compiler, not the raw linker.
With clang+LLD, the bare flag would be ignored.
Signed-off-by: Greg V <greg@unrelenting.technology>
Greg V [Thu, 13 Dec 2018 20:13:25 +0000 (23:13 +0300)]
build: use pkg-config to find libjpeg in meson
Signed-off-by: Greg V <greg@unrelenting.technology>
Pablo Castellano [Wed, 28 Nov 2018 07:45:46 +0000 (08:45 +0100)]
compositor-fbdev: add support for ABGR
Make fbdev work with some Android downstream kernels, like the
asus-grouper (Google Nexus 7 2012).
Signed-off-by: Oliver Smith <ollieparanoid@bitmessage.ch>
Alexandros Frantzis [Thu, 25 Oct 2018 14:32:36 +0000 (17:32 +0300)]
clients: Add simple-dmabuf-egl
Add a client that uses EGL/GLESv2 to draw to dmabuf buffers, utilizing
EGLImages and FBOs. The client uses GBM to create the dmabufs buffers.
The simple-dmabuf-egl client is partly based on patch [1] that changes
dmabuf clients to use GBM instead of libdrm code, but has been greatly
simplified since in this case we don't require direct pixel access or
non-RGBA formats.
[1] https://patchwork.freedesktop.org/patch/239796/
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Marius Vlad [Fri, 23 Nov 2018 10:04:27 +0000 (12:04 +0200)]
libweston/screnshooter: Fix weston screenshot event done if there's no client running
The 'done' event sent back to client with the weston screenshot interface
is not being sent if there is no damage on the plane. This patch (re-uses just
like recording part) weston_output_damage() to achieve that.
Otherwise the client will have to wait (and be blocked) until some
damage on the plane is being done.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Sat, 15 Dec 2018 13:57:19 +0000 (15:57 +0200)]
compositor: Install weston-screenshooter in BINDIR
Previously weston-screenshooter was installed in LIBEXECDIR, but given
that now it can be invoked by the user whenever debug protocol is
enabled, let's intall it into BINDIR. This way, it can be invoked
without the need to modify PATH.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Sat, 15 Dec 2018 13:51:57 +0000 (15:51 +0200)]
compositor: Add some handy wrappers for wet_get_binary_path()
This allows to possibility to specify where to look for the executable
but also simplifies the need of having to pass either BINDIR/LIBEXECDIR
for retrieving full-path of the executable.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 14:31:14 +0000 (16:31 +0200)]
ivi-shell/hmi-controller: Include config.h as to not break ivi-shell build on meson
We're going to eventually pass bindir to weston-screenshooter and we
will need config.h info.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 21:04:52 +0000 (23:04 +0200)]
libweston: Allow taking screenshots when debug protocol is enabled
Screenshots of the outputs can only be taken by having a keyboard
plug-ed in, as to avoid potential malicious intent. On the other hand,
this is problematic as there are cases where a keyboard cannot
be used as a input device. A particular use-case is that for
multiple devices it can be cumbersome to connect a keyboard such
that using ssh can be much easier and can be further automated.
This patch allows taking screenshots without the need of having a
keyboard connected when debug protocol is enabled.
Add also a few words about the fact that this is a serious issue
and can lead to silently leaking the output contents.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 21:03:30 +0000 (23:03 +0200)]
libweston/weston-debug: Add a easy way to determine if the debug protocol has been enabled
This allows additional debug features to depend on the debug protocol being enabled
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Wed, 5 Dec 2018 12:40:31 +0000 (14:40 +0200)]
clients/screenshot: Allow weston-screenshooter to be called directly
As is stands now, libexec/weston-screenshooter can only be called from
within weston server. This will allow weston-screenshooter to be called
on the command line. The final scope here is to allow taking screenshots
without the need of a keyboard.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Thu, 13 Dec 2018 13:24:08 +0000 (15:24 +0200)]
clients/screenshot: Avoid using global variables to pass down data between functions
This is just cosmetic and doesn't fixes anything.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Tue, 18 Dec 2018 08:29:20 +0000 (10:29 +0200)]
libweston/compositor-drm: Add missing debug message for scanout_view
Print debug message when the fb coudn't be retrieved for the primary
plane.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Tue, 18 Dec 2018 08:27:31 +0000 (10:27 +0200)]
libweston/compositor-drm: No need to test for invalid alpha for the view
This is redundant and is already being checked drm_fb_get_from_view()
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 14 Dec 2018 09:56:10 +0000 (11:56 +0200)]
libweston/compositor-drm: Print composition mode in weston-debug
This fixes the situation when using only plane-state mode for
compositing there's no obvious debug message stating that. This patch
makes it slightly better/easier to dermine what mode the compositor is
using currently.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:10:16 +0000 (14:10 +0200)]
Fix compiler warning: unused variable when building with DEBUG
clients/keyboard.c: In function 'dbg':
clients/keyboard.c:276:6: warning: variable 'l' set but not used [-Wunused-but-set-variable]
int l;
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:07:33 +0000 (14:07 +0200)]
Fix compiler warnings: invalid type format
This patch fixes the following warnings:
clients/weston-info.c: In function 'print_tablet_tool_info':
clients/weston-info.c:569:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
printf("\t\t\thardware serial: %lx\n", info->hardware_serial);
^
clients/weston-info.c:572:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
printf("\t\t\thardware wacom: %lx\n", info->hardware_id_wacom);
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:04:46 +0000 (14:04 +0200)]
Fix compiler warnings: clobber variables
This patchs fixes warnings generated by older toolchains:
shared/image-loader.c: In function 'load_png':
shared/image-loader.c:211:12: warning: variable 'data' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
png_byte *data = NULL;
See https://linux.die.net/man/3/longjmp why is this needed.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Fri, 23 Nov 2018 12:02:07 +0000 (14:02 +0200)]
Fix compiler warnings generated by older toolchains/compiler
This fixes warnings like ``may be used uninitialized''
libweston/compositor-drm.c: In function 'drm_device_is_kms':
libweston/compositor-drm.c:6374:12: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
b->drm.id = id;
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Eric Engestrom [Thu, 13 Dec 2018 17:05:31 +0000 (17:05 +0000)]
meson: fix -Wno-foo argument testing
gcc and clang ignore `-Wno-foo` arguments nowadays, so we need to
test the positive variant instead.
Daniel Stone [Sun, 22 Jul 2018 14:38:54 +0000 (15:38 +0100)]
CI: Add Meson build
This uses pip to install Meson in order to get a sufficiently new
version.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Sat, 24 Nov 2018 11:52:49 +0000 (13:52 +0200)]
CI: build rdp-backend
Extends CI build coverage to catch more issues.
freerdp2-dev needs stretch-backports.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 11:51:04 +0000 (13:51 +0200)]
CI: build remoting-plugin
Extends CI build coverage to catch more issues.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 12:13:02 +0000 (14:13 +0200)]
build: add meson to autotools dist tar-ball
This should let people using the dist tarballs to build with meson.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Thu, 24 Nov 2016 15:54:51 +0000 (15:54 +0000)]
Add Meson build system
Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.
More information at http://mesonbuild.com
Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.
This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.
It is expected that the autotools build system will be removed soon
after the next Weston release.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Sun, 9 Dec 2018 12:49:07 +0000 (14:49 +0200)]
tests: fix include in input-timestamps-helper.c
No need to use the protocol directory prefix. This may even be necessary
for the Meson build.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Extracted from the patch adding the Meson build system.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 24 Nov 2018 09:39:48 +0000 (11:39 +0200)]
shared: remove fallback definition of backtrace()
The user of backtrace() was removed in
bb707dc0fe331c9af112a0552b7aa6fde755dd83 and has been unused since.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Pekka Paalanen [Sat, 17 Nov 2018 12:48:04 +0000 (14:48 +0200)]
clients/simple-egl: include weston-egl-ext.h correctly
weston-egl-ext.h was moved to shared/ in
ffff92d592e1635a7ee4511ad3e080f7576553bd
Use the correct include path, so that Meson build does not need to add
../shared to the include path just for this.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Daniel Stone [Tue, 28 Aug 2018 21:53:59 +0000 (22:53 +0100)]
tests: Rename surface-screenshot
Give it a more regular name, matching all the other test plugins.
Signed-off-by: Daniel Stone <daniels@collabora.com>
David Fort [Tue, 4 Dec 2018 22:25:39 +0000 (23:25 +0100)]
rdp-compositor: fix compilation with FreeRDP 2.0-rc4
Some members have been removed from FreeRDP structs, so let's use local
variables.
Marius Vlad [Tue, 20 Nov 2018 15:52:31 +0000 (17:52 +0200)]
compositor: Make pixel format printing in human-friendly form
This would make weston-debug much more readable when looking at
the pixel format of the buffer.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Marius Vlad [Tue, 20 Nov 2018 15:04:57 +0000 (17:04 +0200)]
pixel-formats: Added pixel_format_get_info_shm() helper for printing SHM buffers
In current form SHM buffers pixel format can only be printed as 0 and 1.
With the help of this helper we align with DRM_FORMAT_ pixel format.
Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
Pekka Paalanen [Wed, 26 Sep 2018 11:33:36 +0000 (14:33 +0300)]
compositor-drm: parse all DRM format names
Use the pixel format table to parse format names. This makes the parser
recognize almost all DRM format names.
Not all formats are usable, but we rely on the use to fail
appropriately. What we can use depends on the drivers anyway.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Wed, 26 Sep 2018 11:26:53 +0000 (14:26 +0300)]
pixel-formats: search by name
Add a function to find a format description by the DRM format name. This
will be useful when parsing configuration strings.
While at it, fix the two function formattings in pixel-formats.h to
match everything else in the file.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Wed, 26 Sep 2018 11:00:34 +0000 (14:00 +0300)]
pixel-formats: add name string
There is often a need to print the name of a pixel format. Printing the
raw numeric value is hard to decipher, printing the four ASCII
characters is slightly more human-friendly but still needs a decoder
table. Add a name that can be printed easily.
The bulk of this patch was done with:
sed -i -e 's/\.format = DRM_FORMAT_\(.\+\),/DRM_FORMAT(\1),/' libweston/pixel-formats.c
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Dima Ryazanov [Thu, 15 Nov 2018 06:55:22 +0000 (22:55 -0800)]
Don't look for weston.ini in the current working directory
It's a bit surprising that Weston looks different when launched from the root
of the git repo vs from elsewhere.
But it's also technically a security vulnerability: if I launch it from
a directory like /tmp, it might pick up a weston.ini created by another user,
which could then load modules with arbitrary code. Basically, it's the same
problem as including "." in $PATH.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Emre Ucan [Fri, 2 Nov 2018 14:42:17 +0000 (15:42 +0100)]
ivi-shell: remove input-method section from config
input_method protocol is no longer supported.
Therefore, we should remove it from the example config
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Emre Ucan [Fri, 2 Nov 2018 14:17:00 +0000 (15:17 +0100)]
ivi-shell: remove unused functions and members
input panel related members of ivi_shell struct are
not required anymore. Also get_default_view(),
input_panel_setup() and input_panel_destroy() are not used.
Therefore, we can remove them.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Emre Ucan [Fri, 2 Nov 2018 14:09:48 +0000 (15:09 +0100)]
ivi-shell: remove input panel implementation
it is unused now
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Emre Ucan [Fri, 2 Nov 2018 14:04:49 +0000 (15:04 +0100)]
ivi-shell: don't use input panel implementation
input panel implementation puts contents of an
application, which uses input_method protocol,
on top of all other surfaces. It is not controllable
with ivi-layout interface.
This is not acceptable for an In-Vehicle Infotainment
platform. Because we have to ensure configured scenegraph
cannot be hijacked by any rogue application.
Therefore, I am removing input panel implementation
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Arkadiusz Hiler [Mon, 15 Oct 2018 08:06:11 +0000 (11:06 +0300)]
compositor-drm: Log atomic commits and flips
Add a couple log points for tracking atomic commits and flip processing.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Michael Olbrich [Wed, 10 Oct 2018 11:49:45 +0000 (13:49 +0200)]
libweston-desktop/xdg-shell: update view transforms for xdg popup surfaces
For toplevel surfaces, the shell will do the same thing. Without this, the
commit does not trigger repaints, because the output mask for the surface
is not set.
Without this the popup is not shown unless something else triggers a
repaint. This is usually not seen because the mouse cursor triggers a
repaint at the same time.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Vasilis Liaskovitis [Wed, 10 Oct 2018 14:14:55 +0000 (16:14 +0200)]
gl-renderer, pixman: disconnect the client on unhandled buffer type.
Introduce a helper function to disconnect the client on unhandled
buffer types, and use it in the gl and pixman renderers. The function
is modeled after linux_dmabuf_buffer_send_server_error.
Also print the egl error state in the gl renderer, in case the
unrecognized buffer error happens when querying an egl buffer.
https://gitlab.freedesktop.org/wayland/weston/issues/148
emersion [Wed, 10 Oct 2018 07:46:12 +0000 (09:46 +0200)]
clients: configure cursor theme from XCURSOR_* env
If XCURSOR_THEME or XCURSOR_SIZE is set, use it as the cursor theme
or cursor size.
This is similar to what Qt and some X11 apps do.
orbitcowboy [Fri, 5 Oct 2018 16:02:10 +0000 (16:02 +0000)]
Fixed potential memory leaks in simple-dmabuf-drm.c found by Cppcheck.
Deepak Rawat [Fri, 24 Aug 2018 20:16:03 +0000 (13:16 -0700)]
compositor-drm: Read FB2_MODIFIERS capability
Not all drivers support fb2 modifiers so read the capability before
using drmModeAddFB2WithModifiers.
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Emre Ucan [Fri, 26 Oct 2018 12:42:21 +0000 (14:42 +0200)]
ivi-shell: check ivi_view mappedness in commit_changes()
If the view is not mapped, we do not need to update its
properties. We can use ivi_view_is_mapped() function to
check it.
Also we don't need to call weston_view_damage_below()
for weston_views, which were in the scenegraph. Because
we are calling weston_view_unmap for views of unmapped
ivi_views in build_view_list() function
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Emre Ucan [Fri, 26 Oct 2018 13:07:03 +0000 (15:07 +0200)]
ivi-shell: unmap views which are not in scenegraph
From Michael Olbrich:
"Both the core in weston_compositor_build_view_list() with view.link
and the ivi-shell in commit_screen_list() with view.layer_link
don't remove the old views from the list.
As a result, all views that are not currently in the list have
old broken links. Destroying such a view tries to remove
the view from these lists and will access the old, invalid pointers."
Therefore, we have to unmap weston_views which are not in current
scenegraph of ivi-shell. I implemented ivi_view_is_mapped() function
to check mappedness of ivi_views. The functions checks:
- the view is on a layer's order list
- the layer is on a screen
- the layer and view's ivi_surface are visible
If ivi_view is not mapped but weston_view is still mapped,
we have to unmap the weston_view with weston_view_unmap() call.
Reported-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Emre Ucan [Fri, 26 Oct 2018 12:15:15 +0000 (14:15 +0200)]
ivi-shell: Add build_view_list function
Move the implementation from commit_screen_list to
build_view_list function
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tomohito Esaki [Wed, 24 Jan 2018 08:08:02 +0000 (17:08 +0900)]
Add remoting plugin for output streaming
Remoting plugin support streaming image of virtual output on drm-backend
to remote output. By appending remote-output section in weston.ini,
weston loads remoting plugin module and creates virtual outputs via
remoting plugin. The mode, host, and port properties are configurable in
remote-output section.
This plugin send motion jpeg images to client via RTP using gstreamer.
Client can receive by using following pipeline of gst-launch.
gst-launch-1.0 rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,
encoding-name=JPEG,payload=26" port=[PORTNUMBER] !
rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtpjpegdepay ! jpegdec ! autovideosink \
udpsrc port=[PORTNUMBER+1] ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 !
udpsink port=[PORTNUMBER+2] sync=false async=false
where, PORTNUMBER is specified in weston.ini.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Tomohito Esaki [Tue, 4 Sep 2018 08:18:06 +0000 (17:18 +0900)]
weston: Add set up SIGUSR1 blocking early using pthread_sigmask()
Xwayland block SIGUSR1 signal for handling this signal. However, if some
weston plugins creates additional threads before xwayland is loaded,
this signal get delivered these threads and causes weston quit.
Therefore, we should set up SIGUSR1 blocking early so that these threads
can inherit the setting when created.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Tomohito Esaki [Wed, 31 Jan 2018 08:50:48 +0000 (17:50 +0900)]
compositor-drm: Add Support virtual output
Add support virtual output for streaming image to remote output by
remoting-plugin which will be added by the patch:
"Add remoting plugin for output streaming."
The gbm bo of virtual output is the linear format.
Virtual output is implemented based on a patch by Grigory Kletsko
<grigory.kletsko@cogentembedded.com>.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Tomohito Esaki [Wed, 31 Jan 2018 08:50:15 +0000 (17:50 +0900)]
compositor-drm: store gbm bo flags in drm_output
Store usage flags of gbm bo in drm_output in order to specify the bo
format for each output. A following patch will add a new type of
drm_output which requires different gbm_bo_flags.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Tomohito Esaki [Tue, 22 May 2018 03:05:14 +0000 (12:05 +0900)]
gl-renderer: provide fence sync fd for synchronizing with GPU rendering
Add new API to gl-renderer interface for providing fence sync fd. the
backend can wait for GPU rendering by this API.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Tomohito Esaki [Mon, 10 Sep 2018 02:44:17 +0000 (11:44 +0900)]
compositor-drm: add num_planes to drm_fb structure
Add new member to store number of planes to drm_fb structure.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Emil Velikov [Thu, 18 Oct 2018 14:58:09 +0000 (15:58 +0100)]
libweston: print EGL information as early as possible
In the case where CreateContext/MakeCurrent fails, we still want to
know what the EGL driver is capable of.
Move the EGL info printing, just after the eglInitialize() call to
ensure that.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Emil Velikov [Thu, 18 Oct 2018 14:55:28 +0000 (15:55 +0100)]
libweston: split EGL and GL info logging
Split the two into separate functions. Former requires an initialized
EGL display, while the latter a current context.
We will use that distinction with the next patch.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Alexandros Frantzis [Fri, 12 Oct 2018 09:52:42 +0000 (12:52 +0300)]
xwayland: Silence format-truncation compilation warnings
We are currently formatting 32-bit signed integers into 8 byte buffers,
which are too small, causing the compiler to complain. Update the buffer
size to the minimum required value of 12 bytes: 1 for the sign, 10 for
the number, and 1 for the null byte terminator.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Daniel Stone [Fri, 21 Sep 2018 15:59:08 +0000 (16:59 +0100)]
compositor-drm: Don't warn about missing backlight control
Not every output will have a backlight control, and even if it does we
may just not be able to find it. Not having backlight control isn't an
error, so don't spam the log with it, as doing so can confuse users into
thinking this is an actual error which is responsible for their real
problems.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 21 Sep 2018 15:57:13 +0000 (16:57 +0100)]
gl-renderer: Remove warning on missing extensions
Not having swap_buffers_with_damage could cause a performance impact on
some backends, but at least on GBM it causes no issues. It also seems to
confuse users into thinking it's a legitimate error which could explain
session slowness.
Similarly with buffer_age, whilst we do lose a little bit of performance
by not being able to do partial renders, it is not a great deal, and the
user is unlikely to be able to do anything about it in any event.
Remove the warning; we print the full extension list at startup, so we
already have enough information from the logs to easily diagnose any
real errors.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Philipp Zabel [Thu, 30 Aug 2018 15:41:42 +0000 (17:41 +0200)]
weston: keep non-desktop displays turned off by default
Keep non-desktop heads representing e.g. head mounted displays turned off by
default. When using the DRM backend they can still be enabled by setting an
explicit [output] mode (or "mode=preferred") in weston.ini.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Philipp Zabel [Thu, 30 Aug 2018 15:39:51 +0000 (17:39 +0200)]
compositor-drm: check connector non-desktop property and mark head accordingly
Use the DRM connector "non-desktop" property to mark weston_heads that
represent head mounted displays and other non-standard displays that the
desktop should not be extended to.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Philipp Zabel [Thu, 30 Aug 2018 15:38:03 +0000 (17:38 +0200)]
libweston: add weston_head_{is,set}_non_desktop()
Add non-desktop property for weston_heads representing displays that the
desktop should not be extended to by default, e.g. head mounted displays.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Philipp Zabel [Mon, 3 Sep 2018 18:13:52 +0000 (20:13 +0200)]
compositor-drm: use weston_view_is_opaque()
Implement drm_view_is_opaque() using weston_view_is_opaque(). Also, use
weston_view_is_opaque() directly in drm_output_propose_state(), with the
clipped_view.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Philipp Zabel [Mon, 3 Sep 2018 18:11:15 +0000 (20:11 +0200)]
libweston: add weston_view_is_opaque()
Use the weston_surface is_opaque property, the opaque region, and the view
alpha value to determine whether the weston_view is opaque in a specific
region.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Philipp Zabel [Mon, 3 Sep 2018 17:44:59 +0000 (19:44 +0200)]
libweston: add weston_surface is_opaque property
Add an is_opaque property that is set to true if the attached buffer does not
have an alpha component, or if the solid color is non-transparent.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Changwoo Cho [Fri, 4 Aug 2017 15:30:47 +0000 (00:30 +0900)]
libweston: fix typo in comment
Emmanuel Gil Peyrot [Tue, 18 Sep 2018 09:54:29 +0000 (11:54 +0200)]
ivi-shell: Add missing sentence point
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Sruthik P [Thu, 7 Jun 2018 06:24:59 +0000 (11:54 +0530)]
Fix and remove broken links to confluence pages
emersion [Mon, 17 Sep 2018 21:51:13 +0000 (23:51 +0200)]
weston-info: add xdg-output support
Stefan Agner [Wed, 22 Aug 2018 21:56:07 +0000 (23:56 +0200)]
desktop-shell: allow to center background image
Add the centered option as background-type. This draws the image
once in the center of the screen. If the image is larger, it will
be cropped like scale-crop.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Wed, 22 Aug 2018 21:33:10 +0000 (23:33 +0200)]
desktop-shell: always paint background color first
Only draw the background once, using the the current default
background color or the user specified background color.
This allows for non-filling background image implemenation
while still using the specified background color.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Stefan Agner [Wed, 22 Aug 2018 12:09:18 +0000 (14:09 +0200)]
main: do not exit in case stdin is a closed stream
Weston should not exit if stdin is a closed stream. This allows
to launch with a closed stdin:
# weston <&-
This fixes screen sharing using weston: Weston closes the stdin
before forking itself to execute the screen sharing instance of
weston. Before this patch screen sharing failed with:
Screen share failed: No wl_shm found
unknown child process exited
Fixes: f0d39b2243e5 ("weston: Set CLOEXEC on stdin")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Daniel Stone [Fri, 20 Jul 2018 09:21:28 +0000 (10:21 +0100)]
compositor-drm: Add drm-backend log debug scope
Add a 'drm-debug' scope which prints verbose information about the DRM
backend's repaint cycle, including the decision tree on how views are
assigned (or not) to planes.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 20 Jul 2018 18:00:06 +0000 (19:00 +0100)]
compositor-drm: Add backend pointer to drm_output
Add this for convenience, so it's easier to access when we add the DRM
backend debug scope.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 20 Jul 2018 18:35:05 +0000 (19:35 +0100)]
compositor-drm: Calculate atomic-commit flags earlier
Shift up our calculation of the flags we use for atomic commits. We will
later use this to differentiate between test-only and full commits when
printing debug information inside drm_output_state_apply_atomic.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Daniel Stone [Fri, 20 Jul 2018 08:46:24 +0000 (09:46 +0100)]
compositor: Add scene-graph debug scope
Add a 'scene-graph' debug scope which will dump out the current set of
outputs, layers, and views and as much information as possible about how
they are rendered and composited.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Daniel Stone [Fri, 20 Jul 2018 07:38:25 +0000 (08:38 +0100)]
compositor: Add weston_layer_mask_is_infinite
As a counterpart to weston_layer_set_mask_infinite(), returning if the
mask is the same as what is set.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Thu, 12 Oct 2017 11:18:15 +0000 (13:18 +0200)]
compositor: protocol logger
This is better than running Weston with WAYLAND_DEBUG=server:
- It is enabled on demand, no unnecessary flooding and no need to
restart the compositor if debug was enabled.
- It prints client pointers so that messages with different clients can
be seen apart.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
parse and print message arguments in protocol_log_fn
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:18:14 +0000 (13:18 +0200)]
xwm: convert WM_DEBUG into a weston-debug scope
Instead of a compile time choice, offer the XWM debugging messages
through the weston-debug protocol and tool on demand. Users will not
need to recompile weston to get XWM debugging, and it won't flood the
weston log.
The debug scope needs to be initialized in launcher.c for it be
available from start, before the first X11 client tries to connect and
initializes XWM.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
pass the wm_debug scope to weston_debug_scope_printf API to append
the scopename to the timestr
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:18:13 +0000 (13:18 +0200)]
xwm: move FILE to the callers of dump_property()
This is preparation for using the weston-debug infrastructure for
WM_DEBUG. dump_property() may be called from different debugging
contexts and often needs to be prefixed with more information.
An alternative to this patch would be to pass in the weston_debug_scope
as an argument to dump_property(), but then all callers would need to be
converted to weston-debug infra in a single commit.
Therefore require the callers to provide the FILE* to print to.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:18:12 +0000 (13:18 +0200)]
xwm: dump_property() to use FILE internally
Write the output of dump_property() out in one log call. When multiple
processes (weston and Xwayland) are writing to the same file, this will
keep the property dump uninterrupted by Xwayland debug prints.
This is also preparation for more development in the same direction.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:18:11 +0000 (13:18 +0200)]
compositor: offer logs via weston-debug
This registers a new weston-debug scope "log" through which one can get
live log output interspersed with possible other debugging prints. This
is implemented by passing the format and varargs received in our usual
logging entrypoints through to the debug scope as well.
Anywhere where the varargs set is used twice (once for vfprintf, another
for the debug scope), we copy the va_list in order to avoid reusing it,
which leads to memory safety issues.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:13:44 +0000 (13:13 +0200)]
clients: add weston-debug
A tool for accessing the zcompositor_debug_v1 interface features.
Installed along weston-info, because it should be potentially useful for
people running libweston-based compositors.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Added a man page for weston-debug client
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
[Pekka: fixed 'missing braces aroudn initializer' warning]
Add --list and --all arguments, using interface advertisement.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:13:43 +0000 (13:13 +0200)]
compositor: add option to enable weston_debug
Let users enable the compositor debug protocol on the compositor command
line. This allows weston-debug tool to work.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Thu, 12 Oct 2017 11:13:42 +0000 (13:13 +0200)]
libweston: add weston_debug API and implementation
weston_debug is both a libweston API for relaying debugging messages,
and the compositor-debug wayland protocol implementation for accessing those
debug messages from a Wayland client.
weston_debug_compositor_{create,destroy}() are private API, hence not
exported.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
append the debug scope name along with the timestamp in
weston_debug_scope_timestamp API
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add explicit advertisement of debug scope names.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Pekka Paalanen [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
protocol: add weston-debug.xml
This is a new debugging extension for non-production environments. The
aim is to replace all build-time choosable debug prints in the
compositor with runtime subscribable debug streams.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Added new libweston-$MAJOR-protocols.pc file and install that
for external projects to find the XML files installed by libweston.
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop
unnecessary EXTRA_DIST of weston-debug.xml.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add explicit advertisement of available debug interfaces.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Matteo Valdina [Fri, 31 Aug 2018 14:47:59 +0000 (09:47 -0500)]
gl-renderer: Explicitly zeroing the offset for 2^ plane of SHM_FOMRAT_YUYV
This fix a crash, when gl-renderer uploads the 2^ texture for YUYV.
The pixels buffer was offset of a random value.
Daniel Stone [Tue, 28 Aug 2018 16:55:02 +0000 (17:55 +0100)]
CONTRIBUTING: How do I get started?
Attempt to answer the question on everyone's lips.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 16 Aug 2018 14:22:14 +0000 (17:22 +0300)]
man: make substitutions meson-friendly
Change format of substituted variables to follow the pattern used by
configure_file() in Meson.
This helps the migration to Meson, making man/meson.build much cleaner.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Derek Foreman [Fri, 24 Aug 2018 18:43:34 +0000 (13:43 -0500)]
configure.ac: Reopen master for regular development
Derek Foreman [Fri, 24 Aug 2018 17:39:33 +0000 (12:39 -0500)]
configure.ac: bump to version 5.0.0 for the official release
Stefan Agner [Mon, 20 Aug 2018 15:11:38 +0000 (17:11 +0200)]
compositor-drm: add DPI connector type
Linux v4.7 introduced a new connector type for display parallel
interface (DPI). Add DPI to the list of connectors in the DRM
backend of Weston as well. This avoid DPI connectors showing up
as UNNAMED.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Derek Foreman [Fri, 17 Aug 2018 16:20:27 +0000 (11:20 -0500)]
configure.ac: bump to version 4.0.94 for the RC2 release
Derek Foreman [Wed, 28 Jun 2017 17:17:46 +0000 (12:17 -0500)]
input: Send unique keymap file descriptors to clients
Client may map any file descriptor opened for writing with PROT_WRITE
themselves. On linux, even a read-only file descriptor to an unlinked
file can be re-opened with write permission through /proc/self/fd.
The only way to prevent this is to create a memfd which
is subsequently write-sealed. Unfortunately this prevents clients
from mapping with MAP_SHARED, which is already in widespread usage.
To isolate and protect the keymap, whilst allowing MAP_SHARED clients
to continue to work, use a unique file descriptor for each
wl_keyboard resource.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Derek Foreman [Wed, 28 Jun 2017 16:41:43 +0000 (11:41 -0500)]
input: add weston_keyboard_send_keymap helper function
We've always had "send_keymap" internally, but some places failed to use
it. Since we also use this in the text backend, export it.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Derek Foreman [Fri, 10 Aug 2018 18:03:57 +0000 (13:03 -0500)]
configure.ac: bump to version 4.0.93 for the RC1 release
Harsha M M [Tue, 7 Aug 2018 13:35:03 +0000 (19:05 +0530)]
ivi-shell: Remove the compositor destory listener from list during de-init
During de-init ensure removal of compositor destroy notification
from list. Otherwise a dongling pointer is left behind which will
affect other plugins.
Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Harsha M M [Tue, 7 Aug 2018 13:35:02 +0000 (19:05 +0530)]
libweston: Remove signals from the list during de-init
During de-init ensure removal of added signals from list. Otherwise
a dongling pointer is left behind which will affect other plugins.
Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>