1. 15 6月, 2022 2 次提交
  2. 08 6月, 2022 1 次提交
  3. 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
  4. 04 6月, 2022 4 次提交
  5. 27 5月, 2022 2 次提交
  6. 17 5月, 2022 1 次提交
  7. 11 5月, 2022 1 次提交
  8. 25 4月, 2022 3 次提交
  9. 21 4月, 2022 1 次提交
  10. 07 4月, 2022 2 次提交
  11. 06 4月, 2022 1 次提交
  12. 01 4月, 2022 2 次提交
  13. 29 3月, 2022 1 次提交
  14. 16 3月, 2022 4 次提交
    • V
      drm/amdgpu: Use drm_mode_copy() · 426c89aa
      Ville Syrjälä 提交于
      struct drm_display_mode embeds a list head, so overwriting
      the full struct with another one will corrupt the list
      (if the destination mode is on a list). Use drm_mode_copy()
      instead which explicitly preserves the list head of
      the destination mode.
      
      Even if we know the destination mode is not on any list
      using drm_mode_copy() seems decent as it sets a good
      example. Bad examples of not using it might eventually
      get copied into code where preserving the list head
      actually matters.
      
      Obviously one case not covered here is when the mode
      itself is embedded in a larger structure and the whole
      structure is copied. But if we are careful when copying
      into modes embedded in structures I think we can be a
      little more reassured that bogus list heads haven't been
      propagated in.
      
      @is_mode_copy@
      @@
      drm_mode_copy(...)
      {
      ...
      }
      
      @depends on !is_mode_copy@
      struct drm_display_mode *mode;
      expression E, S;
      @@
      (
      - *mode = E
      + drm_mode_copy(mode, &E)
      |
      - memcpy(mode, E, S)
      + drm_mode_copy(mode, E)
      )
      
      @depends on !is_mode_copy@
      struct drm_display_mode mode;
      expression E;
      @@
      (
      - mode = E
      + drm_mode_copy(&mode, &E)
      |
      - memcpy(&mode, E, S)
      + drm_mode_copy(&mode, E)
      )
      
      @@
      struct drm_display_mode *mode;
      @@
      - &*mode
      + mode
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      426c89aa
    • V
      drm/amdgpu: Remove pointless on stack mode copies · 1cbd7887
      Ville Syrjälä 提交于
      These on stack copies of the modes appear to be pointless.
      Just look at the originals directly.
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: Nikola Cornij <nikola.cornij@amd.com>
      Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1cbd7887
    • A
      drm/amdgpu/display: enable scatter/gather display for DCN 3.1.6 · 0fe382fb
      Alex Deucher 提交于
      Enable scatter/gather display for DCN 3.1.6.
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0fe382fb
    • N
      drm/amd/display: Fix double free during GPU reset on DC streams · 32685b32
      Nicholas Kazlauskas 提交于
      [Why]
      The issue only occurs during the GPU reset code path.
      
      We first backup the current state prior to commiting 0 streams
      internally from DM to DC. This state backup contains valid link
      encoder assignments.
      
      DC will clear the link encoder assignments as part of current state
      (but not the backup, since it was a copied before the commit) and
      free the extra stream reference it held.
      
      DC requires that the link encoder assignments remain cleared/invalid
      prior to commiting. Since the backup still has valid assignments we
      call the interface post reset to clear them. This routine also
      releases the extra reference that the link encoder interface held -
      resulting in a double free (and eventually a NULL pointer dereference).
      
      [How]
      We'll have to do a full DC commit anyway after GPU reset because
      the stream count previously went to 0.
      
      We don't need to retain the assignment that we had backed up, so
      just copy off of the now clean current state assignment after the
      reset has occcurred with the new link_enc_cfg_copy() interface.
      
      Fixes: 6d63fcc2 ("drm/amd/display: Reset link encoder assignments for GPU reset")
      Reviewed-by: NJimmy Kizito <Jimmy.Kizito@amd.com>
      Acked-by: NAlan Liu <HaoPing.Liu@amd.com>
      Signed-off-by: NNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Tested-by: NDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      32685b32
  15. 24 2月, 2022 3 次提交
  16. 22 2月, 2022 1 次提交
  17. 19 2月, 2022 1 次提交
  18. 18 2月, 2022 2 次提交
  19. 17 2月, 2022 3 次提交
  20. 10 2月, 2022 1 次提交
  21. 08 2月, 2022 1 次提交
  22. 01 2月, 2022 1 次提交
  23. 28 1月, 2022 1 次提交