1. 20 Apr, 2018 1 commit
    • Pekka Paalanen's avatar
      libweston: require connected heads for input devices · 8dc6db8c
      Pekka Paalanen authored
      The use case driving this change is a clone mode setup, where the user
      is hotplugging or unplugging a cloned touchscreen. Even if the output
      and head are force-enabled, the touch device should still follow the
      connector connection status. If there is no video signal for the
      touchscreen (disconnected connector), then the touch input should be
      ignored as well.
      
      When the output is force-enabled, we need to trigger
      output_heads_changed from connector status changes. If the head or
      output are not force-enabled, the compositor will likely attach and
      detach the head as appropriate. In clone mode, the attach or detach
      needs to trigger output_heads_changed directly. In other cases, it may
      be handled through the output getting enabled or disabled which are
      different signals.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      8dc6db8c
  2. 17 Apr, 2018 8 commits
  3. 12 Apr, 2018 7 commits
  4. 10 Apr, 2018 4 commits
    • Pekka Paalanen's avatar
      libweston: make wl_output point to weston_head · 055c1137
      Pekka Paalanen authored
      The user data of a wl_resource representing a wl_output protocol object
      used to be a pointer to weston_output. Now that weston_output is being
      split, wl_output more accurately refers to weston_head which is a single
      monitor.
      
      Change the wl_output user data to point to weston_head.
      weston_output_from_resource() is replaced with
      weston_head_from_resource().
      
      This change is not strictly necessary, but architecturally it is the
      right thing to do. In the future there might appear the need to refer to
      a specific head of a cloned pair, for instance.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      v5 Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      055c1137
    • Pekka Paalanen's avatar
      libweston: use head in wl_output global · 0534762b
      Pekka Paalanen authored
      As a wl_output represents weston_head, use a weston_head pointer as the
      wl_output global's user data.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      v5 Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      0534762b
    • Pekka Paalanen's avatar
      libweston: move wl_output to weston_head · 1b9bf598
      Pekka Paalanen authored
      The wl_output protocol interface exposes things like monitor make,
      model, sub-pixel layout and physical dimensions. Obviously wl_output is
      meant to represent a monitor.
      
      The abstraction of a monitor is weston_head. Therefore move the wl_output
      global and the bound resources list into weston_head.
      
      When clone mode gets implemented in the future, this means that monitors
      driven by the same CRTC will still be represented as separate wl_output
      globals. This allows to accurately represent the hardware.
      
      Clone mode that used separate, not frame-locked, CRTCs to drive two
      monitors as clones would necessarily also be exposed as separate
      wl_output since they have different timings.
      
      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>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Acked-by: default avatarDerek Foreman <derekf@osg.samsung.com>
      1b9bf598
    • 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
  5. 20 Feb, 2018 3 commits
  6. 09 Feb, 2018 1 commit
  7. 11 Dec, 2017 1 commit
  8. 27 Nov, 2017 10 commits
  9. 04 Oct, 2017 2 commits
    • Pekka Paalanen's avatar
      libweston: rename weston_output_destroy() to weston_output_release() · ae6d35db
      Pekka Paalanen authored
      'release' is a more appropriate name because the function does not free
      the underlying memory. The main reason for this is that we need the name
      weston_output_destroy() for new API that actually will free also the
      underlying memory.
      
      Since the function is only used in backends and external backends are
      not a thing, this does not cause libweston major version bump, even
      though it does change the ABI. There is no way external users could have
      successfully used this function.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Acked-by Daniel Stone <daniels@collabora.com>
      ae6d35db
    • Pekka Paalanen's avatar
      libweston: weston_output_init(..., +name) · 26ac2e12
      Pekka Paalanen authored
      Add 'name' argument to weston_output_init(). This is much more obvious
      than the assert inside weston_output_init() to ensure the caller has set
      a field in weston_output first.
      
      Now weston_output_init() will strdup() the name itself, which means we
      can drop a whole bunch of strdup()s in the backends. This matches
      weston_output_destroy() which was already calling free() on the name.
      
      All backends are slightly reordered to call weston_output_init() before
      accessing any fields of weston_output, except the Wayland backend which
      would make it a little awkward to do it in this patch. Mind, that
      weston_output_init() still does not reset the struct to zero - it is
      presumed the caller has done it, since weston_output is embedded in the
      backend output structs.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Reviewed-by: default avatarDavid Fort <contact@hardening-consulting.com>
      [Daniel: document name copying]
      Acked-by Daniel Stone <daniels@collabora.com>
      26ac2e12
  10. 25 Jul, 2017 3 commits