AMD General > -----Original Message----- > From: amd-gfx <[email protected]> On Behalf Of > Khatri, Sunil > Sent: Friday, October 16, 2026 10:59 AM > To: Khatri, Sunil <[email protected]>; Deucher, Alexander > <[email protected]>; Koenig, Christian > <[email protected]> > Cc: [email protected] > Subject: Re: [PATCH v1] drm/amdgpu/userq: commit seq64 BO mapping at > queue creation > > Ignore please. Sent new patch. > > On 15-10-2026 11:14 pm, Sunil Khatri wrote: > > The seq64 sync BO's PTE update only ran from the legacy CS path, so > > userqueue-only clients never got it mapped and their fence_drv could > > never signal completion. Add support for userqueues too. > > > > Fixes: ae05e3f3d02b812c ("drm/amdgpu: move amdgpu_vm_bo_update() > call > > into correct location") > > Signed-off-by: Sunil Khatri <[email protected]> > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 21 > +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > > index 4dca1ab48410a..44cf25946a21c 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c > > @@ -720,6 +720,27 @@ amdgpu_userq_create(struct drm_file *filp, union > drm_amdgpu_userq *args) > > if (r) > > goto free_fence_drv; > > > > + /* Update the seq64 BO mapping in VM for User Queues */ > > + if (fpriv->seq64_va) { > > + struct amdgpu_bo *seq64_bo = fpriv->seq64_va->base.bo; > > + > > + r = amdgpu_bo_reserve(seq64_bo, false); > > + if (r) { > > + amdgpu_bo_unreserve(fpriv->vm.root.bo); > > + goto free_fence_drv; > > + } > > + > > + r = amdgpu_vm_bo_update(adev, fpriv->seq64_va, false); > > + if (r) { > > + amdgpu_bo_unreserve(seq64_bo); > > + amdgpu_bo_unreserve(fpriv->vm.root.bo); > > + goto free_fence_drv; > > + } > > + > > + dma_fence_wait(fpriv->seq64_va->last_pt_update, false); > > + amdgpu_bo_unreserve(seq64_bo); > > + } > > + Hi Sunil,
I noticed two issues in the earlier version that are worth checking in the replacement patch. The update runs before VM validation. If the VM page tables were evicted before the first USERQ_CREATE, amdgpu_vm_bo_update() can return -EBUSY because vm->evicting is still set. CREATE then exits before reaching amdgpu_userq_ensure_ev_fence(), which would otherwise trigger VM validation and restore. Also, the root PD is already reserved here. Reserving the seq64 BO with another amdgpu_bo_reserve() uses no shared ww ticket, so it can deadlock against a drm_exec retry that holds seq64 and is waiting for the PD. Could we update seq64 in amdgpu_userq_vm_validate_and_restore_queue(), after VM validation, with the BO reserved through the existing drm_exec, and wait for its PTE update before restoring the queues? please try the patch: "map the seq64 memory when restoring user queues" https://lists.freedesktop.org/archives/amd-gfx/2026-October/155022.html Thanks, Jesse > > if (amdgpu_userq_input_va_validate(adev, queue, args->in.queue_va, > > args->in.queue_size, > > &queue->userq_vas.va.queue_rb) > ||
