diff options
author | Felix Kuehling | 2018-03-23 20:32:32 +0100 |
---|---|---|
committer | Oded Gabbay | 2018-03-23 20:32:32 +0100 |
commit | 6b95e7973a136181e37446bd29b0b2e2f0d2d653 (patch) | |
tree | 0fb6776bf402197ad8b18684b6a09577d88f3e69 /drivers/gpu/drm/amd/amdkfd/kfd_priv.h | |
parent | drm/amdkfd: GFP_NOIO while holding locks taken in MMU notifier (diff) | |
download | kernel-qcow2-linux-6b95e7973a136181e37446bd29b0b2e2f0d2d653.tar.gz kernel-qcow2-linux-6b95e7973a136181e37446bd29b0b2e2f0d2d653.tar.xz kernel-qcow2-linux-6b95e7973a136181e37446bd29b0b2e2f0d2d653.zip |
drm/amdkfd: Add quiesce_mm and resume_mm to kgd2kfd_calls
These interfaces allow KGD to stop and resume all GPU user mode queue
access to a process address space. This is needed for handling MMU
notifiers of userptrs mapped for GPU access in KFD VMs.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_priv.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 96a9cc0f02c9..4d5c49ef2dc5 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -512,6 +512,8 @@ struct qcm_process_device { /* Approx. time before evicting the process again */ #define PROCESS_ACTIVE_TIME_MS 10 +int kgd2kfd_quiesce_mm(struct mm_struct *mm); +int kgd2kfd_resume_mm(struct mm_struct *mm); int kgd2kfd_schedule_evict_and_restore_process(struct mm_struct *mm, struct dma_fence *fence); @@ -681,6 +683,8 @@ struct kfd_process *kfd_get_process(const struct task_struct *); struct kfd_process *kfd_lookup_process_by_pasid(unsigned int pasid); struct kfd_process *kfd_lookup_process_by_mm(const struct mm_struct *mm); void kfd_unref_process(struct kfd_process *p); +int kfd_process_evict_queues(struct kfd_process *p); +int kfd_process_restore_queues(struct kfd_process *p); void kfd_suspend_all_processes(void); int kfd_resume_all_processes(void); |