1. 06 Feb, 2019 2 commits
    • Alexandros Frantzis's avatar
      libweston: Introduce zwp_linux_explicit_synchronization_v1 · 27d7c395
      Alexandros Frantzis authored
      Introduce support for the zwp_linux_explicit_synchronization_unstable_v1
      protocol with an implementation of the zwp_linux_explicit_synchronization_v1
      interface.
      
      Explicit synchronization provides a more versatile notification
      mechanism for buffer readiness and availability, and can be used to
      improve efficiency by integrating with related functionality in display
      and graphics APIs.
      
      In addition, the per-commit nature of the release events provided by
      this protocol potentially offers a solution to a deficiency of the
      wl_buffer.release event (see
      wayland#46).
      
      Support for this protocol depends on the capabilities of the backend, so
      we don't register it by default but provide a function which each
      backend will need to call. In this commit only the headless backend when
      using the noop renderer supports this to enable testing.
      
      Note that the zwp_surface_synchronization_v1 interface, which contains
      the core functionality of the protocol, is not implemented in this
      commit. Support for it will be added in future commits.
      
      Changes in v7:
        - Added some information in the commit message about the benefits of
          the explicit sync protocol.
      
      Changes in v6:
        - Fall back to advertising minor version 1 of the explicit sync protocol,
          although we support minor version 2 features, until the new
          wayland-protocols version is released.
      
      Changes in v5:
        - Meson support.
        - Advertise minor version 2 of the explicit sync protocol.
      
      Changes in v4:
        - Enable explicit sync support in the headless backend for all
          renderers.
      
      Changes in v3:
        - Use wl_resource_get_version() instead of hardcoding version 1.
        - Use updated protocol interface names.
        - Use correct format specifier for resource id.
        - Change test name to 'linux-explicit-synchronization.weston'
          (s/_/-/g).
      
      Changes in v2:
        - Move implementation to separate file so protocol can be registered
          on demand by backends.
        - Register protocol in headless+noop backend for testing purposes.
      Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
      27d7c395
    • Eric Toombs's avatar
      weston: add more libinput config options · 6e229ca2
      Eric Toombs authored
      This is so that, for instance, people using weston as their main Wayland
      compositor can invert the sense of two finger scrolling or change
      pointer acceleration using weston.ini, rather than having to edit C
      code.
      
      All of the options that libinput itself exposes through its API are now
      exposed in weston.ini.  The new options are called `tap-and-drag`,
      `tap-and-drag-lock`, `disable-while-typing`, `middle-emulation`,
      `left-handed`, `rotation`, `accel-profile`, `accel-speed`,
      `scroll-method`, `natural-scroll`, and `scroll-button`. I have
      successfully tested everything except for `rotation`, out of a lack of
      hardware support.
      
      weston now depends directly on libevdev for turning button name strings into
      kernel input codes. This was needed for the `scroll-button` config
      option. (weston already depends indirectly on libevdev through
      libinput, so I figured people would be OK with this.) As a practical
      matter for debian-style packagers, weston now has a build dependency on
      libevdev-dev.
      
      Right now, the code applies the same options to all attached devices
      that a given option is relevant for. There are plans for multiple
      [libinput] sections, each with different device filters, for users who
      need more control here.
      Signed-off-by: Eric Toombs's avatarEric Toombs <3672-ewtoombs@users.noreply.gitlab.freedesktop.org>
      6e229ca2
  2. 07 Jan, 2019 1 commit
    • Pekka Paalanen's avatar
      tests: remove remnants of buffer-count test · 91bf16be
      Pekka Paalanen authored
      The buffer-count test was added in
      40c0c3f9 and removed in
      4938f93f, but the removal left around
      the dependency to EGL headers in weston-test.c.
      
      Removal of those unneeded includes allows us to drop the EGL dependency
      completely from weston-test.c build.
      
      For the Meson build this means that there are no dependency('egl')
      directives anymore without the user friendly error message.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pq@iki.fi>
      91bf16be
  3. 18 Dec, 2018 1 commit
  4. 09 Dec, 2018 1 commit
  5. 30 Oct, 2018 2 commits
    • Tomohito Esaki's avatar
      Add remoting plugin for output streaming · f709d220
      Tomohito Esaki authored
      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's avatarTomohito Esaki <etom@igel.co.jp>
      f709d220
    • Tomohito Esaki's avatar
      weston: Add set up SIGUSR1 blocking early using pthread_sigmask() · f59dc111
      Tomohito Esaki authored
      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's avatarTomohito Esaki <etom@igel.co.jp>
      f59dc111
  6. 17 Sep, 2018 1 commit
  7. 11 Sep, 2018 1 commit
  8. 24 Aug, 2018 2 commits
  9. 17 Aug, 2018 1 commit
  10. 10 Aug, 2018 1 commit
  11. 27 Jul, 2018 1 commit
  12. 13 Jul, 2018 2 commits
  13. 09 Jul, 2018 3 commits
    • Daniel Stone's avatar
      compositor-drm: Use GBM modifier API · 244244d1
      Daniel Stone authored
      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's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Tested-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
      244244d1
    • Sergi Granell's avatar
      compositor-drm: Support plane IN_FORMATS · f4456221
      Sergi Granell authored
      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 f11ec02c ("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's avatarSergi Granell <xerpi.g.12@gmail.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Tested-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
      f4456221
    • Daniel Stone's avatar
      compositor-drm: Add modifiers to GBM dmabuf import · f522e226
      Daniel Stone authored
      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's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Tested-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
      Fixes: #113
      f522e226
  14. 06 Jul, 2018 1 commit
  15. 02 Jul, 2018 1 commit
  16. 11 Jun, 2018 1 commit
  17. 28 May, 2018 2 commits
  18. 10 Apr, 2018 1 commit
    • Pekka Paalanen's avatar
      libweston: introduce weston_head · 01f60211
      Pekka Paalanen authored
      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's avatarPekka 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's avatarDaniel Stone <daniels@collabora.com>
      Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      01f60211
  19. 09 Apr, 2018 3 commits
  20. 02 Apr, 2018 1 commit
  21. 19 Mar, 2018 1 commit
  22. 16 Mar, 2018 2 commits
  23. 06 Mar, 2018 1 commit
  24. 26 Feb, 2018 1 commit
  25. 20 Feb, 2018 1 commit
  26. 09 Feb, 2018 1 commit
    • Pekka Paalanen's avatar
      weston: remove SEGV and ABRT handlers · bb707dc0
      Pekka Paalanen authored
      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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      bb707dc0
  27. 06 Feb, 2018 2 commits
  28. 18 Jan, 2018 1 commit
  29. 19 Dec, 2017 1 commit
    • Pekka Paalanen's avatar
      configure: fix sys/sysmacros.h check · 14a7e371
      Pekka Paalanen authored
      This patch is a copy of
      https://cgit.freedesktop.org/mesa/drm/commit/?id=7040fea0280bad527ed4b3d5eee7d7bfbf303efc
      by Adam Jackson.
      
      Commit 43c5a65b "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's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      14a7e371