From: jsg Date: Mon, 17 Jun 2024 07:32:32 +0000 (+0000) Subject: drm/amdkfd: handle duplicate BOs in reserve_bo_and_cond_vms X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=32069374fc2290e1bc1438931e0ca4e86064d1da;p=openbsd 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 --- 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) {