1. 18 Jul, 2019 21 commits
  2. 16 Jul, 2019 1 commit
  3. 12 Jul, 2019 3 commits
    • Antonio Borneo's avatar
      backend-drm: fix race during system suspend · c90fccc2
      Antonio Borneo authored
      Depending on system loading, weston-launcher could drop the drm
      master access before the compositor and all the clients receive
      the notification. In this case, some commit could be sent to the
      drm driver too late and get refused with error EACCES.
      This error condition is not properly managed and causes weston to
      hang.
      
      Change the return type of start_repaint_loop() and repaint_flush()
      from void to int, and return 0 on success or -1 if the repaint has
      to be cancelled.
      In the callers of start_repaint_loop() and repaint_flush() handle
      the return value and cancel the repaint when needed.
      In backend-drm detect the error EACCES and return -1.
      Note: to keep the code cleaner, this change inverts the execution
      order between weston_output_schedule_repaint_reset() and
      repaint_cancel().
      
      No need to wait for suspend or for any notification; in case the
      weston reschedules a repaint, it will get EACCES again.
      At resume, damage-all guarantees a complete repaint.
      
      This fix is for atomic modeset only.
      Legacy modeset suffers from similar problems, but it is not fixed
      by this change. Since drm_pending_state_apply() never returns
      error for legacy modeset, this change has no impact on legacy
      modeset.
      Signed-off-by: default avatarAntonio Borneo <antonio.borneo@st.com>
      Fixes: #117
      c90fccc2
    • Daniel Stone's avatar
      gl-renderer: Don't leak transformed region · 9c81224e
      Daniel Stone authored
      Unfortunately, our y_invert helper also forgot to free the region it
      transformed to. Clean up our allocation before we exit.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      9c81224e
    • Daniel Stone's avatar
      gl-renderer: Account for offset in output region translation · 3ebd8704
      Daniel Stone authored
      In 55bcb93f ("gl-renderer: Use helper for conversion to EGL rects"),
      we extracted and lovingly commented the transformation from global to
      output co-ordinate space used for EGL_KHR_swap_buffer_with_damage, into
      a new helper function.
      
      The commenting correctly noted the steps we need to perform the
      transformation: shifting by the output's offset into global space,
      followed by applying the output's scale and rotation transformations.
      
      Unfortunately, the code did not live up to the high standards of the
      comment, and forgot to translate by the output's offset. This meant that
      for multiple outputs, we would probably end up with wildly out-of-bounds
      co-ordinates.
      
      Fix the code to first translate by the output's offset in global space,
      ensuring that both our swap_buffers_with_damage, and our partial_update
      co-ordinate sets, can spark joy for those blessed with more than one
      output.
      Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      3ebd8704
  4. 09 Jul, 2019 1 commit
    • Tomohito Esaki's avatar
      remoting: make a gstreamer pipeline configurable · 3ea03bb8
      Tomohito Esaki authored
      Allow a gstreamer pipeline to be configurable via an weston.ini. It is
      necessary that source is appsrc, its name is "src", and sink name is
      "sink" in pipeline. Also, remoting plugin ignore port and host
      configuration if the gst-pipeline is specified.
      3ea03bb8
  5. 08 Jul, 2019 1 commit
  6. 07 Jul, 2019 2 commits
  7. 05 Jul, 2019 4 commits
  8. 04 Jul, 2019 5 commits
    • Ankit Nautiyal's avatar
      libweston: Add content-protection protocol implementation · 5cfe03c8
      Ankit Nautiyal authored
      This patch adds the content-protection protocol implementation, to
      enable a weston client application to request for content-protection
      for its content via HDCP.
      Signed-off-by: Ankit Nautiyal's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      5cfe03c8
    • Ankit Nautiyal's avatar
      libweston: Add support to set content-protection for a weston_surface · 4b6e73d6
      Ankit Nautiyal authored
      The protection requested for a given surface, must reach through the
      weston_surface::pending_state, in the commit-cycle for the
      weston_surface, so that it gets updated in the next commit.
      
      As some protection is requested for a given weston_surface, it means
      protection must be set for each of the outputs which show the surface.
      
      While setting the protection of a weston_output, care must be taken
      so as to avoid, degrading the protection of another surfaces, enjoying
      the protection. For this purpose, all the weston_surfaces that are
      shown on a weston_output are checked for their desired protection.
      The highest of all such desired protections must be set for the
      weston_output to avoid degrading of existing protected surfaces.
      A surface requesting protection for a lower content-type can still be
      provided protection for a higher type but the converse cannot be
      allowed.
      
      This patch adds support to set content-protection for a suface, which
      inturn sets the content-protection for each of the outputs on which
      it is shown, provided, none of the existing surface's protection
      request is downgraded.
      Signed-off-by: Ankit Nautiyal's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      4b6e73d6
    • Ankit Nautiyal's avatar
      libweston: Compute current protection for weston_output and weston_head · 4f64ff8b
      Ankit Nautiyal authored
      The actual protection status for a given weston_head depends upon the
      corresponding drm_head's connector HDCP properties. On the other hand,
      the actual protection for a weston_output is the minimum of the
      protection status of its attached heads.
      As a head's protection changes, the current protection of the output
      to which the head is attached is recomputed.
      
      This patch adds the support to keep track of the current
      content-protection for heads and the outputs.
      Signed-off-by: Ankit Nautiyal's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      4f64ff8b
    • Ankit Nautiyal's avatar
      libweston: Add support to set content-protection for a weston_output · 2690a770
      Ankit Nautiyal authored
      For making an output secure, the content-protection should be set for
      each of head attached to that output. So whenever the protection for
      a weston_output is desired, it means that protection is desired for
      each of the weston_head attached to that weston_output.
      
      This patch introduces a new enum in libweston to represent the
      requested/current protection statuses, equivalent to the type enum
      defined by the weston-secure-output protocol. The new enum helps to
      extend the content-protection status and requests to libweston and
      the backends.
      This patch also adds a new member desired_protection to store the
      desired protection for an output in weston_output.
      Signed-off-by: Ankit Nautiyal's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      2690a770
    • Scott Anderson's avatar
      protocol: Add content-protection protocol · 06aeb0ea
      Scott Anderson authored
      This protocol allows a client to ask the compositor to only allow it to
      be displayed on a "secure" output. This initial version of the protocol
      supports HDCP.
      
      This is loosely based on the chromium secure-output protocol [1].
      
      This protocol is mostly useful for closed system, where the client can
      trust the compositor, such as set-top boxes. This is not a way to
      implement any kind of Digital Rights Management on desktops. The
      compositor would be free to lie to the client, anyway.
      Signed-off-by: Scott Anderson's avatarScott Anderson <scott.anderson@collabora.com>
      Signed-off-by: Ankit Nautiyal's avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
      
      [1]
      https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml
      06aeb0ea
  9. 01 Jul, 2019 2 commits