Commit graph

416 commits

Author SHA1 Message Date
Pekka Paalanen 67a97f2bc0 shared: remove fallback definition of backtrace()
The user of backtrace() was removed in
bb707dc0fe and has been unused since.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
2018-12-09 12:13:36 +02:00
Tomohito Esaki f709d22038 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>
2018-10-30 17:09:01 +09:00
Tomohito Esaki f59dc1112b 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>
2018-10-30 17:09:01 +09:00
emersion b49af1ed19 weston-info: add xdg-output support 2018-09-18 00:17:00 +02:00
Pekka Paalanen 4fc1ee8d5b 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>
2018-09-11 15:24:46 +01:00
Derek Foreman 836b053091 configure.ac: Reopen master for regular development 2018-08-24 13:43:34 -05:00
Derek Foreman 030e7d40fe configure.ac: bump to version 5.0.0 for the official release 2018-08-24 12:39:33 -05:00
Derek Foreman 4533451028 configure.ac: bump to version 4.0.94 for the RC2 release 2018-08-17 11:20:27 -05:00
Derek Foreman dc1418ae8e configure.ac: bump to version 4.0.93 for the RC1 release 2018-08-10 13:03:57 -05:00
Derek Foreman 0335e44731 configure.ac: bump to version 4.0.92 for the beta release 2018-07-27 11:45:59 -05:00
Derek Foreman 280b730144 configure.ac: bump to version 4.0.91 for the alpha release 2018-07-13 11:32:29 -05:00
Emilio Pozuelo Monfort cce820dcaf simple-dmabuf-drm: fix build with --disable-egl
Just rely on getting the supported formats through the dmabuf
extension.

Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-07-13 16:13:32 +01:00
Daniel Stone 244244d11b compositor-drm: Use GBM modifier API
Now that we collect information about which modifiers are supported for
KMS display, and are able to create KMS framebuffers with modifiers,
begin using the modifier-aware GBM API.

Client buffers from dmabuf already store multi-plane and modifier
information into drm_fb. Extend this to drm_fb_get_from_bo(), used for
wl_buffer, cursor, and gbm_surface buffers. wl_buffer buffers should by
convention not require modifiers. Cursor buffers must not require
modifiers, as they should be linear. Prior to this patch, GBM buffers
must have been single-planar, and able to used without explicitly naming
modifiers.

Using gbm_surface_create_with_modifiers allows us to pass the list of
modifiers acceptable to KMS for scanout to GBM, so it can allocate
multi-planar buffers or those which are otherwise only addressible with
modifiers. On platforms supporting and preferring modifiers for scanout,
this means that the gbm_bos we get from our scanout surface need to use
the extended API to query multiple planes, offsets, modifiers, etc.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Emre Ucan <eucan@de.adit-jv.com>
2018-07-09 15:39:32 +01:00
Sergi Granell f4456221db compositor-drm: Support plane IN_FORMATS
The per-plane IN_FORMATS KMS property describes the format/modifier
combinations supported for display on this plane. Read and parse this
format, storing the data in each plane, so we can know which
combinations might work, and which combinations definitely will not
work.

Similarly to f11ec02cad ("compositor-drm: Extract overlay FB import to
helper"), we now use this when considering promoting a view to overlay
planes. If the framebuffer's modifier is definitely not supported by the
plane, we do not attempt to use that plane for that view.

This will also be used in a follow-patch, passing the list of modifiers
to GBM surface allocation to allow it to allocate more optimal buffers.

Signed-off-by: Sergi Granell <xerpi.g.12@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Emre Ucan <eucan@de.adit-jv.com>
2018-07-09 15:39:32 +01:00
Daniel Stone f522e22611 compositor-drm: Add modifiers to GBM dmabuf import
Add support for the GBM_BO_IMPORT_FD_MODIFIER path, which allows us to
import multi-plane dmabufs, as well as format modifiers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Emre Ucan <eucan@de.adit-jv.com>
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/113
2018-07-09 15:39:32 +01:00
Daniel Stone 65a4dbcc14 compositor-drm: Support modifiers for drm_fb
Use the new drmModeAddFB2WithModifiers interface to import buffers with
modifiers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Emre Ucan <eucan@de.adit-jv.com>
2018-07-06 15:04:52 +01:00
Peter Hutterer efdebbc4e8 configure.ac: bump libdrm requirement to 2.4.68
Had a stale libdrm sitting around which gave me errors, both fixed with the
.68 version.

libweston/pixel-formats.c:291:13: error: ‘DRM_FORMAT_NV24’ undeclared here
(not in a function); did you mean ‘DRM_FORMAT_NV21’?
   .format = DRM_FORMAT_NV24,
             ^~~~~~~~~~~~~~~
             DRM_FORMAT_NV21
libweston/pixel-formats.c:296:13: error: ‘DRM_FORMAT_NV42’ undeclared here
(not in a function); did you mean ‘DRM_FORMAT_NV12’?
   .format = DRM_FORMAT_NV42,
             ^~~~~~~~~~~~~~~
             DRM_FORMAT_NV12

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-07-02 14:52:33 +03:00
Daniel Stone dcfb19585e doc: Update for GitLab migration
Update issue report and build instruction URLs for moving to GitLab, and
for everything having been HTTPS-only for quite some time.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-06-11 12:07:57 +03:00
Guido Günther bff906304f simple-dmabuf-drm: support etnaviv drm as well
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 15:24:15 +03:00
David Fort 029583e56e rdp-compositor: fix compilation against FreeRDP 2.0.0 rc2
The SURFACE_BITS_COMMAND struct has changed and some members have been moved in the
bmp field.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-05-28 14:47:07 +03:00
Pekka Paalanen 01f60211b2 libweston: introduce weston_head
In order to support clone modes, libweston needs the concept of a head
that is separate from weston_output. While weston_output manages buffers
and the repaint state machine, weston_head will represent a single
monitor. In the future it will be possible to have a single
weston_output drive one or more weston_heads for a clone mode that
shares the framebuffers between all cloned heads.

All the fields that are obviously properties of the monitor are moved
from weston_output into weston_head.

As moving the fields requires one to touch all the backends for all the
assingments, introduce setter functions for them while we are here. The
setters are identical to the old assignments, for now.

As a temporary measure, weston_output embeds a single head. Also the
ugly casts in weston_head_set_monitor_strings() will be removed by a
follow-up patch.

Libweston major version is bumped, because weston_output struct layout
is changed.

v7:
- Bump libweston major version.

v6:
- adapt to upstream changes in weston_output_set_transform()

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v5 Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
v6 Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
2018-04-10 14:31:05 +03:00
Derek Foreman 61c4a730d2 configure.ac: Bump libweston version to match weston version
configure won't work if weston's version is higher than libweston's.
2018-04-09 16:13:09 -05:00
Derek Foreman 8eb71d1e2c configure.ac: Reopen master for regular development 2018-04-09 13:13:40 -05:00
Derek Foreman e5f33d0112 configure.ac: bump to version 4.0.0 for the official release 2018-04-09 11:55:01 -05:00
Derek Foreman 10fe82fe2d configure.ac: bump to version 3.0.93 for the RC1 release 2018-04-02 13:00:01 -05:00
Derek Foreman dc4024627c configure.ac: bump to version 3.0.92 for the beta release 2018-03-19 15:41:17 -05:00
Guido Günther 6ed5700da5 simple-dmabuf-drm: allow multiple backends
This allows to enable freedreno and intel backends at the same time
building the prerequisites for adding further ones.

[Pekka: fix configure.ac if statements]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-16 13:39:10 +02:00
Michael Tretter 824e499534 configure.ac: fix have_dbus if dbus support is disabled
If dbus support is explicitly disabled, $have_dbus should be no, but was
empty. systemd-login support depends on dbus, but the check does not
trigger correctly, if $have_dbus is empty.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-16 12:34:05 +02:00
Emmanuel Gil Peyrot d29db19fba autoconf: Remove configure line forgotten in bb707dc0fe
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-03-06 09:55:08 +02:00
Derek Foreman e1c69be672 configure.ac: bump to version 3.0.91 for the alpha release 2018-02-26 12:56:12 -06:00
Alexandros Frantzis c3b5d78c1d tests: Introduce input timestamps helper
Introduce helper test code to implement the client side of the
input_timestamps_unstable_v1 protocol. This helper will be used in
upcoming commits to test the server side implementation of the protocol
in libweston.

The input_timestamps_unstable_v1 protocol was introduced in version 1.13
of wayland-protocols, so this commit updates the version dependency in
configure.ac accordingly.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-02-20 10:20:29 +02:00
Pekka Paalanen bb707dc0fe weston: remove SEGV and ABRT handlers
Catching an ABRT is kind of ok, catching a SEGV is russian roulette. We
have been quite lucky with it, but I've started hitting crashes inside
malloc() which causes a deadlock when our SEGV handler needs to malloc()
as well (weston_log_timestamp()).

One reason to catch SEGV and ABRT was to attempt to restore the VT on
the DRM-backend. Nowadays that job is done by logind or weston-launch.

The signal handler also printed a backtrace, which for me personally has
been extremely helpful. Arguably it's not necessary though, when we have
core files and services that catch cores. For instance, if using
systemd, 'coredumpctl gdb' is delightfully easy for getting into the
saved core.

Therefore, this code does more harm than it is useful, so remove it. We
also drop an optional dependency to libunwind.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-02-09 15:16:07 +00:00
Daniel Stone 598ee9ddf5 compositor-drm: Atomic modesetting support
Add support for using the atomic-modesetting API to apply output state.
Unlike previous series, this commit does not unflip sprites_are_broken,
until further work has been done with assign_planes to make it reliable.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Co-authored-by: Louis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.com>
Co-authored-by: Derek Foreman <derek.foreman@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-02-06 13:55:13 +00:00
Pekka Paalanen cd011a6e96 compositor-drm: Discover atomic properties
Set the atomic client cap, where it exists, and use this to discover the
plane/CRTC/connector properties we require for atomic modesetting.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2018-02-06 13:55:13 +00:00
Daniel Stone bac2c549f0 xwayland: Explicitly link with xcb-shape
XWM uses xcb-shape as of 332d1892bb, to exclude the shadow from the
input region. However, it does not explicitly link xcb-shape for the new
symbols; on one of my machines this is pulled in as a transient
dependency (masking the issue), but apparently not the other.

Solve it by explicitly linking xcb-shape and requiring it in configure.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Fixes: 332d1892bb ("xwm: do not include shadow in input region")
Cc: Ian Ray <ian.ray@ge.com>
2018-01-18 12:38:34 +00:00
Pekka Paalanen 14a7e371f5 configure: fix sys/sysmacros.h check
This patch is a copy of
https://cgit.freedesktop.org/mesa/drm/commit/?id=7040fea0280bad527ed4b3d5eee7d7bfbf303efc
by Adam Jackson.

Commit 43c5a65b03 "configure.ac: use
AC_HEADER_MAJOR to detect major()/minor()" started using AC_HEADER_MAJOR
to detect the header where major() is defined. This caused a regression
on systems where glibc is still providing a deprecated definition of
major() through sys/types.h, leading to a bunch of compiler warnings:

/home/pq/git/weston/libweston/launcher-logind.c: In function ‘launcher_logind_open’:
/home/pq/git/weston/libweston/launcher-logind.c:182:13: warning: In the GNU C Library, "major" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "major", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "major", you should undefine it after including <sys/types.h>.
  fd = launcher_logind_take_device(wl, major(st.st_rdev),

The issue has been discussed earlier on
https://lists.gnu.org/archive/html/autoconf/2016-09/msg00013.html

Work around the issue by causing the warning to trigger a build failure
inside AC_HEADER_MAJOR test, so that we get MAJOR_IN_SYSMACROS defined.

Cc: Adam Jackson <ajax@redhat.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-12-19 09:56:27 +02:00
Guido Günther 2006655b31 configure.ac: drop spurious bracket
Otherwise configure output looks like

    checking for library containing pam_open_session... -lpam
    ./configure: line 18064: ]: command not found
    checking for COLORD... yes

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-11 09:33:24 +00:00
Louis-Francis Ratté-Boulianne 037f056ec3 xwm: Use Pango to draw title string if available
If Weston is built with Pango, use it to render the title for
X11 applications and Weston toy toolkit clients. It allows us
to ellipsize the title when there isn't enough space to show the
whole string.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-05 14:09:31 +00:00
Sergei Trofimovich 43c5a65b03 configure.ac: use AC_HEADER_MAJOR to detect major()/minor()
This change slightly updates c4d7f66c12
which added <sys/sysmacros.h> inclusion.

Autoconf has AC_HEADER_MAJOR to find out which header defines
reqiured macros:
    https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html

This change should increase portability across other libcs.

Bug: https://bugs.gentoo.org/610652
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-12-04 19:38:14 +00:00
Alexandros Frantzis 8250a61de1 build,libweston: Use struct timespec for animations
Change code related to animations to use struct timespec to represent
time.

This commit is part of a larger effort to transition the Weston codebase
to struct timespec.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

This bumps the libweston major version due to breakage in the animation
ABI. The commits following this one break more ABI in other parts.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-11-27 11:41:17 +02:00
Reynaldo H. Verdejo Pinochet 71c4f70e08 buildsystem: add missing pkg-config stub for libweston uninstalled
-uninstalled.pc files are a pkg-config facility for working with
uninstalled libraries.

With pkg-config, foo-uninstalled.pc overrides foo.pc. foo-uninstalled.pc
should never be installed, and will be generated with references to the
build directory.

If you set up your environment so pkg-config looks for .pc files in your
build directories, you can use this to build and link against libraries
you haven't installed with "make install".

This can save time and space over installing with a prefix.

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-11-10 12:50:41 -06:00
Alexandros Frantzis e39eb8f896 libweston: Add check and fallback for linux/sync_file.h
The sync file functionality is required by the upcoming GPU render
timeline work, but it's only available in relatively new linux kernel
versions (4.7 and above).

This commit provides a "sanitized" version of the required sync file
definitions.  On systems that don't have the sync file header (due to
having an older kernel), we will be able to fall back to our own
definitions when building.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-09-29 10:20:42 +03:00
Arnaud Vrac 167bbb6d10
configure.ac: remove dependency on mtdev
It's been unused since the legacy (non-libinput) input backends have
been removed.

Signed-off-by: Arnaud Vrac <rawoul@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-08-11 09:59:58 +02:00
Arnaud Vrac d6d97dad03
configure.ac: fix linking when using compiler sanitizers
The GCC address sanitizer overrides dlopen and dlclose, so the configure
test does not detect libdl as a needed dependency for linking. It is
still needed though, as dlsym is not exported by the sanitizer. The
result is that linking fails in the end.

Fix this by checking for dlsym instead of dlopen.

This can be reproduced by configuring the build with:
CFLAGS="-fsanitize=address -fsanitize=undefined"
LDFLAGS="-fsanitize=address -fsanitize=undefined"

Signed-off-by: Arnaud Vrac <rawoul@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-08-11 09:58:14 +02:00
Pekka Paalanen 94e664d92b configure: fix version number
Fixes "configure: error: Weston version is greater than libweston."

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102143
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-08-11 10:44:57 +03:00
Bryce Harrington 1b3c05f558 Reopen master for regular development
A 3.0 branch has been established for stable release work.
2017-08-08 12:01:55 -07:00
Bryce Harrington 2a528187b2 configure.ac: bump to version 3.0.0 for the official release 2017-08-08 11:46:14 -07:00
Bryce Harrington 18e77af67c configure.ac: bump to version 2.99.93 for the RC1 release 2017-08-01 11:19:30 -07:00
Bryce Harrington 4c4b9cfb1a configure.ac: bump to version 2.99.92 for the beta release 2017-07-25 16:32:20 -07:00
Bryce Harrington 1170c66305 configure.ac: bump to version 2.99.91 for the alpha release 2017-07-11 19:16:40 -07:00