1. 14 1月, 2023 1 次提交
  2. 11 1月, 2023 3 次提交
  3. 10 1月, 2023 2 次提交
  4. 06 1月, 2023 2 次提交
  5. 04 1月, 2023 5 次提交
  6. 21 12月, 2022 2 次提交
  7. 16 12月, 2022 4 次提交
  8. 14 12月, 2022 1 次提交
  9. 02 12月, 2022 2 次提交
  10. 30 11月, 2022 2 次提交
  11. 23 11月, 2022 2 次提交
  12. 17 11月, 2022 3 次提交
    • L
      drm/amdgpu/dm/dp_mst: Don't grab mst_mgr->lock when computing DSC state · 14b651b2
      Lyude Paul 提交于
      Now that we've fixed the issue with using the incorrect topology manager,
      we're actually grabbing the topology manager's lock - and consequently
      deadlocking. Luckily for us though, there's actually nothing in AMD's DSC
      state computation code that really should need this lock. The one exception
      is the mutex_lock() in dm_dp_mst_is_port_support_mode(), however we grab no
      locks beneath &mgr->lock there so that should be fine to leave be.
      
      Gitlab issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2171Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 8c20a1ed ("drm/amd/display: MST DSC compute fair share")
      Cc: <stable@vger.kernel.org> # v5.6+
      Reviewed-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      14b651b2
    • L
      drm/amdgpu/dm/mst: Use the correct topology mgr pointer in amdgpu_dm_connector · d3e2c664
      Lyude Paul 提交于
      This bug hurt me. Basically, it appears that we've been grabbing the
      entirely wrong mutex in the MST DSC computation code for amdgpu! While
      we've been grabbing:
      
        amdgpu_dm_connector->mst_mgr
      
      That's zero-initialized memory, because the only connectors we'll ever
      actually be doing DSC computations for are MST ports. Which have mst_mgr
      zero-initialized, and instead have the correct topology mgr pointer located
      at:
      
        amdgpu_dm_connector->mst_port->mgr;
      
      I'm a bit impressed that until now, this code has managed not to crash
      anyone's systems! It does seem to cause a warning in LOCKDEP though:
      
        [   66.637670] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      
      This was causing the problems that appeared to have been introduced by:
      
        commit 4d07b0bc ("drm/display/dp_mst: Move all payload info into the atomic state")
      
      This wasn't actually where they came from though. Presumably, before the
      only thing we were doing with the topology mgr pointer was attempting to
      grab mst_mgr->lock. Since the above commit however, we grab much more
      information from mst_mgr including the atomic MST state and respective
      modesetting locks.
      
      This patch also implies that up until now, it's quite likely we could be
      susceptible to race conditions when going through the MST topology state
      for DSC computations since we technically will not have grabbed any lock
      when going through it.
      
      So, let's fix this by adjusting all the respective code paths to look at
      the right pointer and skip things that aren't actual MST connectors from a
      topology.
      
      Gitlab issue: https://gitlab.freedesktop.org/drm/amd/-/issues/2171Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 8c20a1ed ("drm/amd/display: MST DSC compute fair share")
      Cc: <stable@vger.kernel.org> # v5.6+
      Reviewed-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      d3e2c664
    • L
      drm/amdgpu/mst: Stop ignoring error codes and deadlocking · 7cce4cd6
      Lyude Paul 提交于
      It appears that amdgpu makes the mistake of completely ignoring the return
      values from the DP MST helpers, and instead just returns a simple
      true/false. In this case, it seems to have come back to bite us because as
      a result of simply returning false from
      compute_mst_dsc_configs_for_state(), amdgpu had no way of telling when a
      deadlock happened from these helpers. This could definitely result in some
      kernel splats.
      
      V2:
      * Address Wayne's comments (fix another bunch of spots where we weren't
        passing down return codes)
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 8c20a1ed ("drm/amd/display: MST DSC compute fair share")
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: <stable@vger.kernel.org> # v5.6+
      Reviewed-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7cce4cd6
  13. 16 11月, 2022 8 次提交
  14. 11 11月, 2022 1 次提交
    • V
      drm/amdgpu: Use drm_mode_init() for on-stack modes · 0a204ce0
      Ville Syrjälä 提交于
      Initialize on-stack modes with drm_mode_init() to guarantee
      no stack garbage in the list head, or that we aren't copying
      over another mode's list head.
      
      Based on the following cocci script, with manual fixups:
      @decl@
      identifier M;
      expression E;
      @@
      - struct drm_display_mode M = E;
      + struct drm_display_mode M;
      
      @@
      identifier decl.M;
      expression decl.E;
      statement S, S1;
      @@
      struct drm_display_mode M;
      ... when != S
      + drm_mode_init(&M, &E);
      +
      S1
      
      @@
      expression decl.E;
      @@
      - &*E
      + E
      
      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
      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>
      0a204ce0
  15. 10 11月, 2022 2 次提交