1. 20 Dec, 2022 5 commits
    • Arnd Bergmann's avatar
      drm/amd/pm: avoid large variable on kernel stack · d118b18f
      Arnd Bergmann authored
      The activity_monitor_external[] array is too big to fit on the
      kernel stack, resulting in this warning with clang:
      
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1438:12: error: stack frame size (1040) exceeds limit (1024) in 'smu_v13_0_7_get_power_profile_mode' [-Werror,-Wframe-larger-than]
      
      Use dynamic allocation instead. It should also be possible to
      have single element here instead of the array, but this seems
      easier.
      
      v2: fix up argument to sizeof() (Alex)
      
      Fixes: 334682ae ("drm/amd/pm: enable workload type change on smu_v13_0_7")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d118b18f
    • Philip Yang's avatar
      drm/amdkfd: Fix double release compute pasid · 1a799c4c
      Philip Yang authored
      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: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      1a799c4c
    • Philip Yang's avatar
      drm/amdkfd: Fix kfd_process_device_init_vm error handling · 29d48b87
      Philip Yang authored
      Should only destroy the ib_mem and let process cleanup worker to free
      the outstanding BOs. Reset the pointer in pdd->qpd structure, to avoid
      NULL pointer access in process destroy worker.
      
       BUG: kernel NULL pointer dereference, address: 0000000000000010
       Call Trace:
        amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel+0x46/0xb0 [amdgpu]
        kfd_process_device_destroy_cwsr_dgpu+0x40/0x70 [amdgpu]
        kfd_process_destroy_pdds+0x71/0x190 [amdgpu]
        kfd_process_wq_release+0x2a2/0x3b0 [amdgpu]
        process_one_work+0x2a1/0x600
        worker_thread+0x39/0x3d0
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      29d48b87
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-fixes-2022-12-15' of... · 38624d2c
      Dave Airlie authored
      Merge tag 'drm-intel-next-fixes-2022-12-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
      
      - Documentation fixe (Matt, Miaoqian)
      - OA-perf related fix (Umesh)
      - VLV/CHV HDMI/DP audio fix (Ville)
      - Display DDI/Transcoder fix (Khaled)
      - Migrate fixes (Chris, Matt)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/Y5uFYOJ/1jgf2eSE@intel.com
      38624d2c
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.2-2022-12-15' of... · 5504eb16
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.2-2022-12-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
      
      amd-drm-fixes-6.2-2022-12-15:
      
      amdgpu:
      - Spelling fix
      - BO pin fix
      - Properly handle polaris 10/11 overlap asics
      - GMC9 fix
      - SR-IOV suspend fix
      - DCN 3.1.4 fix
      - KFD userptr locking fix
      - SMU13.x fixes
      - GDS/GWS/OA handling fix
      - Reserved VMID handling fixes
      - FRU EEPROM fix
      - BO validation fixes
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221215224936.6438-1-alexander.deucher@amd.com
      5504eb16
  2. 15 Dec, 2022 4 commits
  3. 14 Dec, 2022 16 commits
  4. 13 Dec, 2022 4 commits
  5. 09 Dec, 2022 10 commits
  6. 06 Dec, 2022 1 commit