aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2021-04-22 01:09:54 +0000
committerAlex Deucher <[email protected]>2022-12-14 14:48:05 +0000
commitf95f51a4c3357eabf74fe14ab7daa5b5c0422b27 (patch)
treef74905009f1ef2b536fdbc3b0f4a22a9a8e69f27 /drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
parentdrm/amd/display: Add DCN314 display SG Support (diff)
downloadkernel-f95f51a4c3357eabf74fe14ab7daa5b5c0422b27.tar.gz
kernel-f95f51a4c3357eabf74fe14ab7daa5b5c0422b27.zip
drm/amdgpu: Add notifier lock for KFD userptrs
Add a per-process MMU notifier lock for processing notifiers from userptrs. Use that lock to properly synchronize page table updates with MMU notifiers. Signed-off-by: Felix Kuehling <[email protected]> Reviewed-by: Xiaogang Chen<[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
index 13ed94d3b01b..e2edcd010ccc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
@@ -29,12 +29,13 @@
#include <linux/rwsem.h>
#include <linux/workqueue.h>
#include <linux/interval_tree.h>
+#include <linux/mmu_notifier.h>
int amdgpu_hmm_range_get_pages(struct mmu_interval_notifier *notifier,
uint64_t start, uint64_t npages, bool readonly,
void *owner, struct page **pages,
struct hmm_range **phmm_range);
-int amdgpu_hmm_range_get_pages_done(struct hmm_range *hmm_range);
+bool amdgpu_hmm_range_get_pages_done(struct hmm_range *hmm_range);
#if defined(CONFIG_HMM_MIRROR)
int amdgpu_hmm_register(struct amdgpu_bo *bo, unsigned long addr);