Skip to content

Commit 55c7d6a

Browse files
committed
Merge tag 'drm-next-2022-12-23' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Holiday fixes! Two batches from amd, and one group of i915 changes. 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 - Avoid large variable on the stack - S0ix fixes - SMU 13.x fixes - VCN fix - Add missing fence reference amdkfd: - Fix init vm error handling - Fix double release of compute pasid i915 - Documentation fixes - OA-perf related fix - VLV/CHV HDMI/DP audio fix - Display DDI/Transcoder fix - Migrate fixes" * tag 'drm-next-2022-12-23' of git://anongit.freedesktop.org/drm/drm: (39 commits) drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency drm/amdgpu: enable VCN DPG for GC IP v11.0.4 drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 drm/amd/pm: correct the fan speed retrieving in PWM for some SMU13 asics drm/amd/pm: bump SMU13.0.0 driver_if header to version 0x34 drm/amdgpu: skip MES for S0ix as well since it's part of GFX drm/amd/pm: avoid large variable on kernel stack drm/amdkfd: Fix double release compute pasid drm/amdkfd: Fix kfd_process_device_init_vm error handling drm/amd/pm: update SMU13.0.0 reported maximum shader clock drm/amd/pm: correct SMU13.0.0 pstate profiling clock settings drm/amd/pm: enable GPO dynamic control support for SMU13.0.7 drm/amd/pm: enable GPO dynamic control support for SMU13.0.0 drm/amdgpu: revert "generally allow over-commit during BO allocation" drm/amdgpu: Remove unnecessary domain argument drm/amdgpu: Fix size validation for non-exclusive domains (v4) drm/amdgpu: Check if fru_addr is not NULL (v2) drm/i915/ttm: consider CCS for backup objects drm/i915/migrate: fix corner case in CCS aux copying drm/amdgpu: rework reserved VMID handling ...
2 parents 06d65a6 + fe8f5b2 commit 55c7d6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+647
-372
lines changed

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

Lines changed: 12 additions & 5 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
}
@@ -265,8 +270,10 @@ int amdgpu_amdkfd_get_pcie_bandwidth_mbytes(struct amdgpu_device *adev, bool is_
265270
(&((struct amdgpu_fpriv *) \
266271
((struct drm_file *)(drm_priv))->driver_priv)->vm)
267272

273+
int amdgpu_amdkfd_gpuvm_set_vm_pasid(struct amdgpu_device *adev,
274+
struct file *filp, u32 pasid);
268275
int amdgpu_amdkfd_gpuvm_acquire_process_vm(struct amdgpu_device *adev,
269-
struct file *filp, u32 pasid,
276+
struct file *filp,
270277
void **process_info,
271278
struct dma_fence **ef);
272279
void amdgpu_amdkfd_gpuvm_release_process_vm(struct amdgpu_device *adev,

0 commit comments

Comments
 (0)