1. 24 Oct, 2022 4 commits
    • Rodrigo Siqueira's avatar
      drm/amd/display: Remove wrong pipe control lock · ca08a172
      Rodrigo Siqueira authored
      When using a device based on DCN32/321,
      we have an issue where a second
      4k@60Hz display does not light up,
      and the system becomes unresponsive
      for a few minutes. In the debug process,
      it was possible to see a hang
      in the function dcn20_post_unlock_program_front_end
      in this part:
      
      for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS*1000
      	&& hubp->funcs->hubp_is_flip_pending(hubp); j++)
      	mdelay(1);
      }
      
      The hubp_is_flip_pending always returns positive
      for waiting pending flips which is a symptom of
      pipe hang. Additionally, the dmesg log shows
      this message after a few minutes:
      
        BUG: soft lockup - CPU#4 stuck for 26s!
        ...
        [  +0.000003]  dcn20_post_unlock_program_front_end+0x112/0x340 [amdgpu]
        [  +0.000171]  dc_commit_state_no_check+0x63d/0xbf0 [amdgpu]
        [  +0.000155]  ? dc_validate_global_state+0x358/0x3d0 [amdgpu]
        [  +0.000154]  dc_commit_state+0xe2/0xf0 [amdgpu]
      
      This confirmed the hypothesis that we had a pipe
      hanging somewhere. Next, after checking the
      ftrace entries, we have the below weird
      sequence:
      
       [..]
        2)               |        dcn10_lock_all_pipes [amdgpu]() {
        2)   0.120 us    |          optc1_is_tg_enabled [amdgpu]();
        2)               |          dcn20_pipe_control_lock [amdgpu]() {
        2)               |            dc_dmub_srv_clear_inbox0_ack [amdgpu]() {
        2)   0.121 us    |              amdgpu_dm_dmub_reg_write [amdgpu]();
        2)   0.551 us    |            }
        2)               |            dc_dmub_srv_send_inbox0_cmd [amdgpu]() {
        2)   0.110 us    |              amdgpu_dm_dmub_reg_write [amdgpu]();
        2)   0.511 us    |            }
        2)               |            dc_dmub_srv_wait_for_inbox0_ack [amdgpu]() {
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
        2)   0.110 us    |              amdgpu_dm_dmub_reg_read [amdgpu]();
       [..]
      
      We are not expected to read from dmub register
      so many times and for so long. From the trace log,
      it was possible to identify that the function
      dcn20_pipe_control_lock was triggering the dmub
      operation when it was unnecessary and causing
      the hang issue. This commit drops the unnecessary
      dmub code and, consequently, fixes the second display not
      lighting up the issue.
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      ca08a172
    • Kenneth Feng's avatar
      drm/amd/pm: allow gfxoff on gc_11_0_3 · 08841950
      Kenneth Feng authored
      allow gfxoff on gc_11_0_3
      Signed-off-by: default avatarKenneth Feng <kenneth.feng@amd.com>
      Reviewed-by: default avatarYang Wang <kevinyang.wang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      08841950
    • Rafael Mendonca's avatar
      drm/amdkfd: Fix memory leak in kfd_mem_dmamap_userptr() · 90bfee14
      Rafael Mendonca authored
      If the number of pages from the userptr BO differs from the SG BO then the
      allocated memory for the SG table doesn't get freed before returning
      -EINVAL, which may lead to a memory leak in some error paths. Fix this by
      checking the number of pages before allocating memory for the SG table.
      
      Fixes: 264fb4d3 ("drm/amdgpu: Add multi-GPU DMA mapping helpers")
      Signed-off-by: default avatarRafael Mendonca <rafaelmendsr@gmail.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      90bfee14
    • Lijo Lazar's avatar
      drm/amdgpu: Remove ATC L2 access for MMHUB 2.1.x · d2c4c156
      Lijo Lazar authored
      MMHUB 2.1.x versions don't have ATCL2. Remove accesses to ATCL2 registers.
      
      Since they are non-existing registers, read access will cause a
      'Completer Abort' and gets reported when AER is enabled with the below patch.
      Tagging with the patch so that this is backported along with it.
      
      v2: squash in uninitialized warning fix (Nathan Chancellor)
      
      Fixes: 8795e182 ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()")
      Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      d2c4c156
  2. 21 Oct, 2022 3 commits
  3. 20 Oct, 2022 10 commits
  4. 19 Oct, 2022 23 commits