1. 11 5月, 2022 1 次提交
  2. 01 4月, 2022 2 次提交
  3. 29 3月, 2022 1 次提交
  4. 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
  5. 24 2月, 2022 3 次提交
  6. 22 2月, 2022 1 次提交
  7. 19 2月, 2022 1 次提交
  8. 18 2月, 2022 2 次提交
  9. 17 2月, 2022 3 次提交
  10. 10 2月, 2022 1 次提交
  11. 08 2月, 2022 1 次提交
  12. 01 2月, 2022 1 次提交
  13. 28 1月, 2022 1 次提交
  14. 26 1月, 2022 4 次提交
  15. 25 1月, 2022 1 次提交
  16. 19 1月, 2022 1 次提交
  17. 17 1月, 2022 1 次提交
  18. 15 1月, 2022 2 次提交
  19. 12 1月, 2022 2 次提交
  20. 08 1月, 2022 2 次提交
  21. 15 12月, 2021 3 次提交
  22. 14 12月, 2021 2 次提交