1. 16 2月, 2023 1 次提交
  2. 09 2月, 2023 5 次提交
  3. 04 2月, 2023 1 次提交
  4. 02 2月, 2023 3 次提交
  5. 26 1月, 2023 3 次提交
  6. 19 1月, 2023 4 次提交
  7. 11 1月, 2023 1 次提交
  8. 10 1月, 2023 4 次提交
    • C
      drm/amdgpu: fix pipeline sync v2 · 3bd68b32
      Christian König 提交于
      This fixes a potential memory leak of dma_fence objects in the CS code
      as well as glitches in firefox because of missing pipeline sync.
      
      v2: use the scheduler instead of the fence context
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2323
      Tested-by: Michal Kubecek mkubecek@suse.cz
      Tested-by: NVlastimil Babka <vbabka@suse.cz>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230109130120.73389-1-christian.koenig@amd.com
      3bd68b32
    • Y
      drm/amdgpu: Fixed bug on error when unloading amdgpu · 99f1a36c
      YiPeng Chai 提交于
      Fixed bug on error when unloading amdgpu.
      
      The error message is as follows:
      [  377.706202] kernel BUG at drivers/gpu/drm/drm_buddy.c:278!
      [  377.706215] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
      [  377.706222] CPU: 4 PID: 8610 Comm: modprobe Tainted: G          IOE      6.0.0-thomas #1
      [  377.706231] Hardware name: ASUS System Product Name/PRIME Z390-A, BIOS 2004 11/02/2021
      [  377.706238] RIP: 0010:drm_buddy_free_block+0x26/0x30 [drm_buddy]
      [  377.706264] Code: 00 00 00 90 0f 1f 44 00 00 48 8b 0e 89 c8 25 00 0c 00 00 3d 00 04 00 00 75 10 48 8b 47 18 48 d3 e0 48 01 47 28 e9 fa fe ff ff <0f> 0b 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 41 54 55 48 89 f5 53
      [  377.706282] RSP: 0018:ffffad2dc4683cb8 EFLAGS: 00010287
      [  377.706289] RAX: 0000000000000000 RBX: ffff8b1743bd5138 RCX: 0000000000000000
      [  377.706297] RDX: ffff8b1743bd5160 RSI: ffff8b1743bd5c78 RDI: ffff8b16d1b25f70
      [  377.706304] RBP: ffff8b1743bd59e0 R08: 0000000000000001 R09: 0000000000000001
      [  377.706311] R10: ffff8b16c8572400 R11: ffffad2dc4683cf0 R12: ffff8b16d1b25f70
      [  377.706318] R13: ffff8b16d1b25fd0 R14: ffff8b1743bd59c0 R15: ffff8b16d1b25f70
      [  377.706325] FS:  00007fec56c72c40(0000) GS:ffff8b1836500000(0000) knlGS:0000000000000000
      [  377.706334] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  377.706340] CR2: 00007f9b88c1ba50 CR3: 0000000110450004 CR4: 00000000003706e0
      [  377.706347] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  377.706354] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  377.706361] Call Trace:
      [  377.706365]  <TASK>
      [  377.706369]  drm_buddy_free_list+0x2a/0x60 [drm_buddy]
      [  377.706376]  amdgpu_vram_mgr_fini+0xea/0x180 [amdgpu]
      [  377.706572]  amdgpu_ttm_fini+0x12e/0x1a0 [amdgpu]
      [  377.706650]  amdgpu_bo_fini+0x22/0x90 [amdgpu]
      [  377.706727]  gmc_v11_0_sw_fini+0x26/0x30 [amdgpu]
      [  377.706821]  amdgpu_device_fini_sw+0xa1/0x3c0 [amdgpu]
      [  377.706897]  amdgpu_driver_release_kms+0x12/0x30 [amdgpu]
      [  377.706975]  drm_dev_release+0x20/0x40 [drm]
      [  377.707006]  release_nodes+0x35/0xb0
      [  377.707014]  devres_release_all+0x8b/0xc0
      [  377.707020]  device_unbind_cleanup+0xe/0x70
      [  377.707027]  device_release_driver_internal+0xee/0x160
      [  377.707033]  driver_detach+0x44/0x90
      [  377.707039]  bus_remove_driver+0x55/0xe0
      [  377.707045]  pci_unregister_driver+0x3b/0x90
      [  377.707052]  amdgpu_exit+0x11/0x6c [amdgpu]
      [  377.707194]  __x64_sys_delete_module+0x142/0x2b0
      [  377.707201]  ? fpregs_assert_state_consistent+0x22/0x50
      [  377.707208]  ? exit_to_user_mode_prepare+0x3e/0x190
      [  377.707215]  do_syscall_64+0x38/0x90
      [  377.707221]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      Signed-off-by: NYiPeng Chai <YiPeng.Chai@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      99f1a36c
    • M
      drm/amd: Delay removal of the firmware framebuffer · 1923bc5a
      Mario Limonciello 提交于
      Removing the firmware framebuffer from the driver means that even
      if the driver doesn't support the IP blocks in a GPU it will no
      longer be functional after the driver fails to initialize.
      
      This change will ensure that unsupported IP blocks at least cause
      the driver to work with the EFI framebuffer.
      
      Cc: stable@vger.kernel.org
      Suggested-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: NMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1923bc5a
    • L
      drm/amdgpu: Fix potential NULL dereference · 0be7ed8e
      Luben Tuikov 提交于
      Fix potential NULL dereference, in the case when "man", the resource manager
      might be NULL, when/if we print debug information.
      
      Cc: Alex Deucher <Alexander.Deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: AMD Graphics <amd-gfx@lists.freedesktop.org>
      Cc: Dan Carpenter <error27@gmail.com>
      Cc: kernel test robot <lkp@intel.com>
      Fixes: 7554886d ("drm/amdgpu: Fix size validation for non-exclusive domains (v4)")
      Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0be7ed8e
  9. 06 1月, 2023 2 次提交
  10. 05 1月, 2023 1 次提交
  11. 22 12月, 2022 2 次提交
  12. 21 12月, 2022 3 次提交
    • T
      drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 · 8660495a
      Tim Huang 提交于
      MES is part of gfxoff and MES suspend and resume are skipped for S0i3.
      But the mes_self_test call path is still in the amdgpu_device_ip_late_init.
      it's should also be skipped for s0ix as no hardware re-initialization
      happened.
      
      Besides, mes_self_test will free the BO that triggers a lot of warning
      messages while in the suspend state.
      
      [   81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu]
      [   81.679435] Call Trace:
      [   81.679726]  <TASK>
      [   81.679981]  amdgpu_mes_remove_hw_queue+0x17a/0x230 [amdgpu]
      [   81.680857]  amdgpu_mes_self_test+0x390/0x430 [amdgpu]
      [   81.681665]  mes_v11_0_late_init+0x37/0x50 [amdgpu]
      [   81.682423]  amdgpu_device_ip_late_init+0x53/0x280 [amdgpu]
      [   81.683257]  amdgpu_device_resume+0xae/0x2a0 [amdgpu]
      [   81.684043]  amdgpu_pmops_resume+0x37/0x70 [amdgpu]
      [   81.684818]  pci_pm_resume+0x5c/0xa0
      [   81.685247]  ? pci_pm_thaw+0x90/0x90
      [   81.685658]  dpm_run_callback+0x4e/0x160
      [   81.686110]  device_resume+0xad/0x210
      [   81.686529]  async_resume+0x1e/0x40
      [   81.686931]  async_run_entry_fn+0x33/0x120
      [   81.687405]  process_one_work+0x21d/0x3f0
      [   81.687869]  worker_thread+0x4a/0x3c0
      [   81.688293]  ? process_one_work+0x3f0/0x3f0
      [   81.688777]  kthread+0xff/0x130
      [   81.689157]  ? kthread_complete_and_exit+0x20/0x20
      [   81.689707]  ret_from_fork+0x22/0x30
      [   81.690118]  </TASK>
      [   81.690380] ---[ end trace 0000000000000000 ]---
      
      v2: make the comment clean and use adev->in_s0ix instead of
      adev->suspend
      Signed-off-by: NTim Huang <tim.huang@amd.com>
      Reviewed-by: NMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.0, 6.1
      8660495a
    • A
      drm/amdgpu: skip MES for S0ix as well since it's part of GFX · afa6646b
      Alex Deucher 提交于
      It's also part of gfxoff.
      
      Cc: stable@vger.kernel.org # 6.0, 6.1
      Reviewed-by: NMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      afa6646b
    • P
      drm/amdkfd: Fix double release compute pasid · 1a799c4c
      Philip Yang 提交于
      If kfd_process_device_init_vm returns failure after vm is converted to
      compute vm and vm->pasid set to compute pasid, KFD will not take
      pdd->drm_file reference. As a result, drm close file handler maybe
      called to release the compute pasid before KFD process destroy worker to
      release the same pasid and set vm->pasid to zero, this generates below
      WARNING backtrace and NULL pointer access.
      
      Add helper amdgpu_amdkfd_gpuvm_set_vm_pasid and call it at the last step
      of kfd_process_device_init_vm, to ensure vm pasid is the original pasid
      if acquiring vm failed or is the compute pasid with pdd->drm_file
      reference taken to avoid double release same pasid.
      
       amdgpu: Failed to create process VM object
       ida_free called for id=32770 which is not allocated.
       WARNING: CPU: 57 PID: 72542 at ../lib/idr.c:522 ida_free+0x96/0x140
       RIP: 0010:ida_free+0x96/0x140
       Call Trace:
        amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu]
        amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu]
        drm_file_free.part.13+0x216/0x270 [drm]
        drm_close_helper.isra.14+0x60/0x70 [drm]
        drm_release+0x6e/0xf0 [drm]
        __fput+0xcc/0x280
        ____fput+0xe/0x20
        task_work_run+0x96/0xc0
        do_exit+0x3d0/0xc10
      
       BUG: kernel NULL pointer dereference, address: 0000000000000000
       RIP: 0010:ida_free+0x76/0x140
       Call Trace:
        amdgpu_pasid_free_delayed+0xe1/0x2a0 [amdgpu]
        amdgpu_driver_postclose_kms+0x2d8/0x340 [amdgpu]
        drm_file_free.part.13+0x216/0x270 [drm]
        drm_close_helper.isra.14+0x60/0x70 [drm]
        drm_release+0x6e/0xf0 [drm]
        __fput+0xcc/0x280
        ____fput+0xe/0x20
        task_work_run+0x96/0xc0
        do_exit+0x3d0/0xc10
      Signed-off-by: NPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1a799c4c
  13. 15 12月, 2022 4 次提交
  14. 14 12月, 2022 6 次提交