1. 18 3月, 2019 6 次提交
  2. 19 2月, 2019 1 次提交
  3. 18 9月, 2018 1 次提交
  4. 04 8月, 2018 2 次提交
  5. 30 7月, 2018 1 次提交
    • L
      media: v4l: vsp1: Fix deadlock in VSPDL DRM pipelines · 8eb0e642
      Laurent Pinchart 提交于
      The VSP uses a lock to protect the BRU and BRS assignment when
      configuring pipelines. The lock is taken in vsp1_du_atomic_begin() and
      released in vsp1_du_atomic_flush(), as well as taken and released in
      vsp1_du_setup_lif(). This guards against multiple pipelines trying to
      assign the same BRU and BRS at the same time.
      
      The DRM framework calls the .atomic_begin() operations in a loop over
      all CRTCs included in an atomic commit. On a VSPDL (the only VSP type
      where this matters), a single VSP instance handles two CRTCs, with a
      single lock. This results in a deadlock when the .atomic_begin()
      operation is called on the second CRTC.
      
      The DRM framework serializes atomic commits that affect the same CRTCs,
      but doesn't know about two CRTCs sharing the same VSPDL. Two commits
      affecting the VSPDL LIF0 and LIF1 respectively can thus race each other,
      hence the need for a lock.
      
      This could be fixed on the DRM side by forcing serialization of commits
      affecting CRTCs backed by the same VSPDL, but that would negatively
      affect performances, as the locking is only needed when the BRU and BRS
      need to be reassigned, which is an uncommon case.
      
      The lock protects the whole .atomic_begin() to .atomic_flush() sequence.
      The only operation that can occur in-between is vsp1_du_atomic_update(),
      which doesn't touch the BRU and BRS, and thus doesn't need to be
      protected by the lock. We can thus only take the lock around the
      pipeline setup calls in vsp1_du_atomic_flush(), which fixes the
      deadlock.
      
      Fixes: f81f9adc ("media: v4l: vsp1: Assign BRU and BRS to pipelines dynamically")
      Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: NKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      8eb0e642
  6. 26 5月, 2018 2 次提交
  7. 17 5月, 2018 3 次提交
  8. 04 5月, 2018 15 次提交
  9. 26 2月, 2018 2 次提交
  10. 04 12月, 2017 1 次提交
  11. 03 8月, 2017 3 次提交
  12. 30 7月, 2017 3 次提交