From 32069374fc2290e1bc1438931e0ca4e86064d1da Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 17 Jun 2024 07:32:32 +0000 Subject: [PATCH] drm/amdkfd: handle duplicate BOs in reserve_bo_and_cond_vms From Lang Yu 3194771798ef256af75577a0a8a2e8ce45726c78 in linux-6.6.y/6.6.34 2a705f3e49d20b59cd9e5cc3061b2d92ebe1e5f0 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 6bbd18cb7c1..dc3fd9790ee 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -1135,7 +1135,8 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem, int ret; ctx->sync = &mem->sync; - drm_exec_init(&ctx->exec, DRM_EXEC_INTERRUPTIBLE_WAIT); + drm_exec_init(&ctx->exec, DRM_EXEC_INTERRUPTIBLE_WAIT | + DRM_EXEC_IGNORE_DUPLICATES); drm_exec_until_all_locked(&ctx->exec) { ctx->n_vms = 0; list_for_each_entry(entry, &mem->attachments, list) { -- 2.20.1