1. 23 Sep, 2021 6 commits
  2. 22 Sep, 2021 1 commit
  3. 29 Aug, 2021 3 commits
  4. 25 Aug, 2021 1 commit
  5. 24 Aug, 2021 1 commit
    • John Stultz's avatar
      drm_hwcomposer: Quiet noisy errors when planes don't support various attributes · 66763d51
      John Stultz authored
      
      
      If a plane doesn't support alpha or rotation, and IsValidForLayer()
      fails, we see lots of logcat noise to the effect of:
      08-24 04:45:42.957   453   453 E hwc-platform: Failed to emplace layer 0, dropping it
      08-24 04:45:42.957   453   453 E hwc-platform: Failed provision stage with ret -22
      08-24 04:45:42.957   453   453 E hwc-drm-display-composition: Planner failed provisioning planes ret=-22
      08-24 04:45:42.957   453   453 E hwc-drm-two: Failed to plan the composition ret=-22
      
      This noise is unneccessarily worrisome, as they don't really
      help explain why things fail, and we still fall back to client
      composing and frames are correctly composited.
      
      Thus, this patch switches the errors to verbose-level warnings,
      which match the level in IsValidForLayer() which explain what
      actually is going wrong.
      
      Change-Id: I7ed06906b8d9e02e6ec0ac50a94346e9f9c05ac6
      Signed-off-by: John Stultz's avatarJohn Stultz <john.stultz@linaro.org>
      66763d51
  6. 31 Jul, 2021 1 commit
    • John Stultz's avatar
      drm_hwcomposer: Fix sync_file fd leak from "Rework audofd" · 8adf5443
      John Stultz authored
      In commit 0fade37a ("drm_hwcomposer: Rework autofd"),
      a change to some very subtle existing code caused a resource
      leak such that after 10 minutes or so of active display
      output, we would start seeing:
      
        android.hardware.graphics.composer@2.3-service: failed to dup fence 10
      
      over and over in logcat. Moving the mouse would cause black
      frame to flicker and eventually Surfaceflinger would crash
      and restart.
      
      The problem was subtle change in the following hunk:
      @@ -1047,10 +1049,9 @@ HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBlendMode(int32_t mode) {
       HWC2::Error DrmHwcTwo::HwcLayer::SetLayerBuffer(buffer_handle_t buffer,
                                                       int32_t acquire_fence) {
         supported(__func__);
      -  UniqueFd uf(acquire_fence);
      
         set_buffer(buffer);
      -  set_acquire_fence(uf.get());
      +  acquire_fence_ = UniqueFd(fcntl(acquire_fence, F_DUPFD_CLOEXEC));
         return HWC2::Error::None;
       }
      
      The core of the problem being, that the UniqueFd class calls
      close(fd_) in its descructor. So while the change using
      fcntl(...,F_DUPFD_CLOEXEC) matches what was burried in
      set_acquire_fence(), dropping the creation (and more importantly
      the destruction when it goes out of scope) of uf changes the
      logic so we don't end up calling close on the aquire_fence fd
      argument passed in.
      
      One can confirm this resource leak by doing:
        adb shell lsof | grep composer
      
      And noticing the number of sync_file fds growing over time.
      
      Thus, this patch fixes the logic, so instead of dup()'ing the
      passed in fd, (and then closing it as done before Roman's
      patch), we can just set aquire_fence_ to a new UniqueFd directly
      using the aquire_fence fd passed in.
      
      This pattern actually occured twice, so I've fixed it in both
      places.
      
      Fixes: 0fade37a
      
       ("drm_hwcomposer: Rework autofd")
      Signed-off-by: John Stultz's avatarJohn Stultz <john.stultz@linaro.org>
      Change-Id: Iff2ca1c0b6701abbdc10c6ee92edb21a4b84a841
      8adf5443
  7. 24 Jul, 2021 2 commits
  8. 19 May, 2021 3 commits
  9. 09 May, 2021 3 commits
  10. 07 May, 2021 1 commit
    • Benjamin Li's avatar
      drm_hwcomposer: add DRM_PROPERTY_TYPE_BITMASK · 9127dc88
      Benjamin Li authored
      
      
      Bitmask properties are integers that additionally have strings associated
      with each bit. For example, the "rotation" property's bits are described
      as "rotate-90", "reflect-x", and so on.
      
      The bitmask integer is not actually passed to us -- instead, the interface
      for enums is used, except that more than one value can be set. This means we
      must query using the associated strings, rather than use bit index mappings
      provided as constants in the public kernel header drm_mode.h.
      
      Signed-off-by: Benjamin Li's avatarBenjamin Li <benl@squareup.com>
      9127dc88
  11. 27 Apr, 2021 1 commit
  12. 06 Apr, 2021 14 commits
  13. 02 Apr, 2021 1 commit
  14. 19 Mar, 2021 1 commit
  15. 16 Mar, 2021 1 commit