1. 18 Oct, 2017 1 commit
  2. 13 Oct, 2017 3 commits
  3. 04 Oct, 2017 17 commits
    • Daniel Stone's avatar
      compositor-drm: Allow disabling universal planes · be1090b5
      Daniel Stone authored
      Add a test environment variable to allow disabling universal planes.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      be1090b5
    • Daniel Stone's avatar
      gl-renderer: Ignore INVALID modifier · b138d7af
      Daniel Stone authored
      If the user has passed an INVALID modifier, it's because there is no
      applicable modifier, and the buffer layout should be determined by a
      magic side-channel call (e.g. bo_get_tiling). If the modifier is
      INVALID, don't try to pass it through to EGL, but just drop it.
      
      On the other hand, if a modifier _is_ explicitly specified and we don't
      have the modifiers extension, then refuse to import the buffer.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      b138d7af
    • Pekka Paalanen's avatar
      compositor-fbdev: fix finish_frame_timer leak · cbe7fb0b
      Pekka Paalanen authored
      The timer was never removed anywhere. Remove it in disable() to match
      what happens in enable().
      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>
      cbe7fb0b
    • Pekka Paalanen's avatar
      compositor-fbdev: rename fbdev_output_disable_handler() · 82ffe79b
      Pekka Paalanen authored
      This is a more logical name for the function, matching the pattern used
      in other backends and the hook names.
      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>
      82ffe79b
    • Pekka Paalanen's avatar
      compositor-fbdev: always destroy renderer-output on disable · 61e5a272
      Pekka Paalanen authored
      If we pass the base->enabled test, then the renderer output is
      guaranteed to be there, so we can just destroy it.
      
      Destroying it before unmap makes the sequence match better the enable
      path.
      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>
      61e5a272
    • Pekka Paalanen's avatar
      compositor-fbdev: simplify FB destroy/unmap/disable · a51e71fb
      Pekka Paalanen authored
      Rename fbdev_frame_buffer_destroy() to fbdev_frame_buffer_unmap()
      because that is what it does. Adding the destruction of hw_surface in it
      makes it the perfect counterpart to fbdev_frame_buffer_map() which
      simplifies the code.
      
      fbdev_frame_buffer_map() can no longer call that, so just open-code the
      munmap() there. It is an error path, we don't really care about
      failures in an error path.
      
      The error path of fbdev_output_enable() is converted to call
      buffer_unmap() since that is exactly what it did.
      
      fbdev_output_disable() became redundant, being identical to
      fbdev_frame_buffer_unmap().
      
      Invariant: output->hw_surface cannot be non-NULL without output->fb
      being non-NULL. hw_surface wraps the mmapped memory so cannot exist
      without the mmap.
      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>
      a51e71fb
    • Pekka Paalanen's avatar
      compositor-fbdev: remove unused output arguments · 82db6b79
      Pekka Paalanen authored
      A few functions had argument 'output' which was not used at all. Remove
      such unused arguments.
      
      The coming migration to the head-based output API would have made it
      awkward to come up with the output argument for these, but luckily they
      are not actually needed.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: Sergi Granell's avatarSergi Granell <xerpi.g.12@gmail.com>
      Acked-by Daniel Stone <daniels@collabora.com>
      82db6b79
    • Pekka Paalanen's avatar
      libweston: set backend pointer earlier · 7da9a380
      Pekka Paalanen authored
      Change all backends to set the core backend pointer early.
      
      This is necessary for libweston core to be able to access the backend
      vfuncs before the backend init function returns. Particularly,
      weston_output_init() will be needing to inspect the backend vfuncs to
      see if the backend has been converted to a new API. Backends that create
      outputs as part of their init would fail without setting the pointer
      earlier.
      
      For consistency, all backends are modified instead of just those that
      could hit an issue.
      
      Libweston core will take care of resetting the backend pointer to NULL
      in case of error since "libweston: ensure backend is not loaded twice".
      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>
      7da9a380
    • Pekka Paalanen's avatar
      libweston: ensure backend is not loaded twice · d7e35118
      Pekka Paalanen authored
      Check and ensure that a compositor can only load one backend
      successfully. If a backend fails to load, it is theoretically possible
      to try another backend. Once loading succeeds, only destroying the
      compositor would allow "unloading" a backend.
      
      If backend init fail, ensure the backend pointer remains NULL to avoid
      calling into a half-loaded backend on e.g. compositor destruction.
      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>
      d7e35118
    • 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: send more wl_surface.enter/leave events · 01e00688
      Pekka Paalanen authored
      A client may have bound the same wl_output multiple times, for who knows
      what reason. As the server cannot know which wl_output resource to use
      for which wl_surface, send enter/leave events for all of them.
      
      This is a protocol correctness fix.
      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>
      01e00688
    • Pekka Paalanen's avatar
      compositor-drm: set all properties in create_output_for_connector · a0bfedc1
      Pekka Paalanen authored
      Move the remaining scattered setup of the fixed properties into
      create_output_for_connector(). All these are already known and they
      cannot change.
      
      This helps future refactoring.
      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>
      a0bfedc1
    • Pekka Paalanen's avatar
      compositor-drm: set output make/model/serial once · 6f1866b3
      Pekka Paalanen authored
      This fixes a regression where monitor make and model would always be
      advertised as "unknown" to Wayland clients. The EDID strings were parsed
      at create_output_for_connector() time, but the fallback "unknown" values
      were set in weston_drm_output_api::set_mode vfunc later. This made the
      correct monitor info be shown in the log, but not sent to clients.
      
      The purpose of the "unknown" assignments is to give fallback values in
      case EDID is not providing them.
      
      Fix all that by moving all setting of the make, model and serial into
      create_output_for_connector(). These values cannot change afterwards
      anyway. While at it, document find_and_parse_output_edid().
      
      The ugly casts in create_output_for_connector() are required to silence
      compositor warnings from ignoring const attribute. This is temporary,
      and a future refactoring will get rid of the casts.
      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>
      6f1866b3
    • Pekka Paalanen's avatar
      compositor-wayland: move output init into common, fix error path · 1580be68
      Pekka Paalanen authored
      Move the weston_output_init() call into wayland_output_create_common().
      This avoids passing the name twice to different functions, and follows
      the precedent set in "libweston: weston_output_init(..., +name)" for
      calling init before accessing fields.
      
      Since the error paths in wayland_output_create_for_parent_output() and
      wayland_output_create_fullscreen() are now guaranteed to have
      weston_output init'd, call weston_output_destroy() appropriately. There
      might be more to free than just the name.
      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>
      1580be68
    • 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
    • Pekka Paalanen's avatar
      tests: ensure output dependent IVI tests run · d05a8192
      Pekka Paalanen authored
      There are IVI tests that require an output. Previously these tests would
      silently skip if no outputs were present. However, a test setup should
      always have outputs with these tests. Skipping could easily leave the
      tests dead without notice.
      
      Make these tests fail instead of skip if there are no outputs.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Reviewed-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
      Acked-by Daniel Stone <daniels@collabora.com>
      d05a8192
    • Pekka Paalanen's avatar
      libweston: move weston_output::mode_list init to core · 42704145
      Pekka Paalanen authored
      Initialize the list in weston_output_init() instead of doing it
      separately in each backend.
      
      One would expect weston_output_init() to initialize all weston_output
      members, at least those that are not NULL.
      
      We rely on the set_size() functions to be called only once, as is
      assert()'d. If set_size() becomes callable multiple times, this patch
      will force them to be fixed to properly manage the mode list instead of
      losing all members.
      
      compositor-wayland.c is strange in
      wayland_output_create_for_parent_output(): it first called
      wayland_output_set_size() that initialized the mode list with a single
      mode manufactured from width and height and set that mode as current.
      Then it continued to reset the mode list and adding the list of modes
      from the parent output, leaving the current mode left to point to a mode
      struct that is no longer in the mode list and with a broken 'link'
      element. This patch changes things such that the manufactured mode is
      left in the list, and the parent mode list is added. This is probably
      not quite right either.
      Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
      Reviewed-by: eucan's avatarEmre Ucan <eucan@de.adit-jv.com>
      Reviewed-by: default avatarIan Ray <ian.ray@ge.com>
      Acked-by Daniel Stone <daniels@collabora.com>
      42704145
  4. 03 Oct, 2017 1 commit
  5. 02 Oct, 2017 1 commit
  6. 29 Sep, 2017 4 commits
  7. 26 Sep, 2017 1 commit
  8. 25 Sep, 2017 6 commits
  9. 18 Sep, 2017 4 commits
  10. 04 Sep, 2017 2 commits