]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdgpu: use hmm_pfns instead of array of pages
authorSunil Khatri <sunil.khatri@amd.com>
Wed, 17 Sep 2025 14:42:43 +0000 (20:12 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Sep 2025 14:22:31 +0000 (10:22 -0400)
commitc5b3cc417b0260abc74ed32f6baa626c9de917c0
treeb2a583424d55e738f504dc8172a259db52120a46
parentae4d627e43ccecc403e7378811289b33de38e67d
drm/amdgpu: use hmm_pfns instead of array of pages

we dont need to allocate local array of pages to hold
the pages returned by the hmm, instead we could use
the hmm_range structure itself to get to hmm_pfn
and get the required pages directly.

This avoids call to alloc/free quite a lot.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
drivers/gpu/drm/amd/amdkfd/kfd_svm.c