Skip to content

Commit 5504eb1

Browse files
committed
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: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 66efff5 + 7a18e08 commit 5504eb1

32 files changed

+449
-248
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/mm.h>
3030
#include <linux/kthread.h>
3131
#include <linux/workqueue.h>
32+
#include <linux/mmu_notifier.h>
3233
#include <kgd_kfd_interface.h>
3334
#include <drm/ttm/ttm_execbuf_util.h>
3435
#include "amdgpu_sync.h"
@@ -65,6 +66,7 @@ struct kgd_mem {
6566
struct mutex lock;
6667
struct amdgpu_bo *bo;
6768
struct dma_buf *dmabuf;
69+
struct hmm_range *range;
6870
struct list_head attachments;
6971
/* protected by amdkfd_process_info.lock */
7072
struct ttm_validate_buffer validate_list;
@@ -75,7 +77,7 @@ struct kgd_mem {
7577

7678
uint32_t alloc_flags;
7779

78-
atomic_t invalid;
80+
uint32_t invalid;
7981
struct amdkfd_process_info *process_info;
8082

8183
struct amdgpu_sync sync;
@@ -131,7 +133,8 @@ struct amdkfd_process_info {
131133
struct amdgpu_amdkfd_fence *eviction_fence;
132134

133135
/* MMU-notifier related fields */
134-
atomic_t evicted_bos;
136+
struct mutex notifier_lock;
137+
uint32_t evicted_bos;
135138
struct delayed_work restore_userptr_work;
136139
struct pid *pid;
137140
bool block_mmu_notifications;
@@ -180,7 +183,8 @@ int kfd_debugfs_kfd_mem_limits(struct seq_file *m, void *data);
180183
bool amdkfd_fence_check_mm(struct dma_fence *f, struct mm_struct *mm);
181184
struct amdgpu_amdkfd_fence *to_amdgpu_amdkfd_fence(struct dma_fence *f);
182185
int amdgpu_amdkfd_remove_fence_on_pt_pd_bos(struct amdgpu_bo *bo);
183-
int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem, struct mm_struct *mm);
186+
int amdgpu_amdkfd_evict_userptr(struct mmu_interval_notifier *mni,
187+
unsigned long cur_seq, struct kgd_mem *mem);
184188
#else
185189
static inline
186190
bool amdkfd_fence_check_mm(struct dma_fence *f, struct mm_struct *mm)
@@ -201,7 +205,8 @@ int amdgpu_amdkfd_remove_fence_on_pt_pd_bos(struct amdgpu_bo *bo)
201205
}
202206

203207
static inline
204-
int amdgpu_amdkfd_evict_userptr(struct kgd_mem *mem, struct mm_struct *mm)
208+
int amdgpu_amdkfd_evict_userptr(struct mmu_interval_notifier *mni,
209+
unsigned long cur_seq, struct kgd_mem *mem)
205210
{
206211
return 0;
207212
}

0 commit comments

Comments
 (0)