1. 24 8月, 2022 2 次提交
    • L
      drm/display/dp_mst: Add nonblocking helpers for DP MST · a5c2c0d1
      Lyude Paul 提交于
      As Daniel Vetter pointed out, if we only use the atomic modesetting locks
      with MST it's technically possible for a driver with non-blocking modesets
      to race when it comes to MST displays - as we make the mistake of not doing
      our own CRTC commit tracking in the topology_state object.
      
      This could potentially cause problems if something like this happens:
      
      * User starts non-blocking commit to disable CRTC-1 on MST topology 1
      * User starts non-blocking commit to enable CRTC-2 on MST topology 1
      
      There's no guarantee here that the commit for disabling CRTC-2 will only
      occur after CRTC-1 has finished, since neither commit shares a CRTC - only
      the private modesetting object for MST. Keep in mind this likely isn't a
      problem for blocking modesets, only non-blocking.
      
      So, begin fixing this by keeping track of which CRTCs on a topology have
      changed by keeping track of which CRTCs we release or allocate timeslots
      on. As well, add some helpers for:
      
      * Setting up the drm_crtc_commit structs in the ->commit_setup hook
      * Waiting for any CRTC dependencies from the previous topology state
      
      v2:
      * Use drm_dp_mst_atomic_setup_commit() directly - Jani
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-9-lyude@redhat.com
      a5c2c0d1
    • L
      drm/display/dp_mst: Call them time slots, not VCPI slots · df78f7f6
      Lyude Paul 提交于
      VCPI is only sort of the correct term here, originally the majority of this
      code simply referred to timeslots vaguely as "slots" - and since I started
      working on it and adding atomic functionality, the name "VCPI slots" has
      been used to represent time slots.
      
      Now that we actually have consistent access to the DisplayPort spec thanks
      to VESA, I now know this isn't actually the proper term - as the
      specification refers to these as time slots.
      
      Since we're trying to make this code as easy to figure out as possible,
      let's take this opportunity to correct this nomenclature and call them by
      their proper name - timeslots. Likewise, we rename various functions
      appropriately, along with replacing references in the kernel documentation
      and various debugging messages.
      
      It's important to note that this patch series leaves the legacy MST code
      untouched for the most part, which is fine since we'll be removing it soon
      anyhow. There should be no functional changes in this series.
      
      v2:
      * Add note that Wayne Lin from AMD suggested regarding slots being between
        the source DP Tx and the immediate downstream DP Rx
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-5-lyude@redhat.com
      df78f7f6
  2. 12 8月, 2022 1 次提交
  3. 27 7月, 2022 1 次提交
  4. 25 7月, 2022 4 次提交
  5. 21 7月, 2022 1 次提交
  6. 14 7月, 2022 2 次提交
  7. 13 7月, 2022 5 次提交
  8. 08 7月, 2022 1 次提交
  9. 06 7月, 2022 4 次提交
  10. 30 6月, 2022 2 次提交
  11. 24 6月, 2022 2 次提交
  12. 22 6月, 2022 5 次提交
  13. 21 6月, 2022 2 次提交
  14. 16 6月, 2022 1 次提交
  15. 15 6月, 2022 3 次提交
  16. 08 6月, 2022 1 次提交
  17. 07 6月, 2022 1 次提交
    • L
      drm/amd/display: Implement MPO PSR SU · 7cc191ee
      Leo Li 提交于
      [WHY]
      
      For additional power savings, PSR SU (also referred to as PSR2) can be
      enabled on eDP panels with PSR SU support.
      
      PSR2 saves more power compared to PSR1 by allowing more opportunities
      for the display hardware to be shut down. In comparison to PSR1, Shut
      down can now occur in-between frames, as well as in display regions
      where there is no visible update. In otherwords, it allows for some
      display hw components to be enabled only for a **selectively updated**
      region of the visible display. Hence PSR SU.
      
      [HOW]
      
      To define the SU region, support from the OS is required. OS needs to
      inform driver of damaged regions that need to be flushed to the eDP
      panel. Today, such support is lacking in most compositors.
      
      Therefore, an in-between solution is to implement PSR SU for MPO and
      cursor scenarios. The plane bounds can be used to define the damaged
      region to be flushed to panel. This is achieved by:
      
      * Leveraging dm_crtc_state->mpo_requested flag to identify when MPO is
        enabled.
      * If MPO is enabled, only add updated plane bounds to dirty region.
        Determine plane update by either:
          * Existence of drm damaged clips attached to the plane (added by a
            damage-aware compositor)
          * Change in fb id (flip)
          * Change in plane bounds (position and dimensions)
      * If cursor is enabled, the old_pos and new_pos of cursor plus cursor
        size is used as damaged regions(*).
      
      (*) Cursor updates follow a different code path through DC. PSR SU for
      cursor is already implemented in DC, and the only thing required to
      enable is to set DC_PSR_VERSION_SU_1 on the eDP link. See
      dcn10_dmub_update_cursor_data().
      Signed-off-by: NLeo Li <sunpeng.li@amd.com>
      Acked-by: NLeo Li <sunpeng.li@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7cc191ee
  18. 04 6月, 2022 2 次提交