summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
diff options
context:
space:
mode:
authorSunil Khatri <sunil.khatri@amd.com>2025-10-10 18:09:57 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-10-13 14:14:36 -0400
commit737da5363cc07c96d59f2ebaf9f9f87235becf1d (patch)
tree8506ff443271442f46e3b153cd00395bc1081203 /drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
parent071bba962456a46b261fcefe26bd533cbc059ea2 (diff)
drm/amdgpu: update the functions to use amdgpu version of hmm
At times we need a bo reference for hmm and for that add a new struct amdgpu_hmm_range which will hold an optional bo member and hmm_range. Use amdgpu_hmm_range instead of hmm_range and let the bo as an optional argument for the caller if they want to the bo reference to be taken or they want to handle that explicitly. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index d0b1468a2ae1..dbdf33bc03b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -1057,7 +1057,7 @@ static int init_user_pages(struct kgd_mem *mem, uint64_t user_addr,
struct amdkfd_process_info *process_info = mem->process_info;
struct amdgpu_bo *bo = mem->bo;
struct ttm_operation_ctx ctx = { true, false };
- struct hmm_range *range;
+ struct amdgpu_hmm_range *range;
int ret = 0;
mutex_lock(&process_info->lock);
@@ -1089,7 +1089,7 @@ static int init_user_pages(struct kgd_mem *mem, uint64_t user_addr,
return 0;
}
- range = amdgpu_hmm_range_alloc();
+ range = amdgpu_hmm_range_alloc(NULL);
if (unlikely(!range)) {
ret = -ENOMEM;
goto unregister_out;
@@ -2573,7 +2573,7 @@ static int update_invalid_user_pages(struct amdkfd_process_info *process_info,
}
}
- mem->range = amdgpu_hmm_range_alloc();
+ mem->range = amdgpu_hmm_range_alloc(NULL);
if (unlikely(!mem->range))
return -ENOMEM;
/* Get updated user pages */