On 10/8/26 00:15, Shahyan Soltani wrote:
> Calling amdgpu_vm_bo_update() this early is unnecessary. moving it to
> amdgpu_cs_vm_handling is the correct location for this function and is
> required to allow the VM to initialize without waking up sleep.
> 
> Signed-off-by: Shahyan Soltani <[email protected]>

It could be that this is regressing user queues, but that would then be a 
separate bug in the user queue restore handling.

Adding Sunil on CC just for awareness.

Reviewed-by: Christian König <[email protected]>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c    | 14 ++++++++++++++
>  drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c |  7 -------
>  2 files changed, 14 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index d059e0c92866..2d01a831d534 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -1159,6 +1159,20 @@ static int amdgpu_cs_vm_handling(struct 
> amdgpu_cs_parser *p)
>                       return r;
>       }
>  
> +     if (fpriv->seq64_va) {
> +             bo_va = fpriv->seq64_va;
> +             r = amdgpu_vm_bo_update(adev, bo_va, false);
> +             if (r) {
> +                     DRM_ERROR("failed to do vm_bo_update on userq sem\n");
> +                     return r;
> +             }
> +
> +             r = amdgpu_sync_fence(&p->sync, bo_va->last_pt_update,
> +                                   GFP_KERNEL);
> +             if (r)
> +                     return r;
> +     }
> +
>       /* FIXME: In theory this loop shouldn't be needed any more when
>        * amdgpu_vm_handle_moved handles all moved BOs that are reserved
>        * with p->ticket. But removing it caused test regressions, so I'm
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c
> index 21a225b0116a..fbf9ec7d467b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c
> @@ -103,13 +103,6 @@ int amdgpu_seq64_map(struct amdgpu_device *adev, struct 
> amdgpu_vm *vm,
>               goto error;
>       }
>  
> -     r = amdgpu_vm_bo_update(adev, *bo_va, false);
> -     if (r) {
> -             DRM_ERROR("failed to do vm_bo_update on userq sem\n");
> -             amdgpu_vm_bo_del(adev, *bo_va);
> -             goto error;
> -     }
> -
>  error:
>       drm_exec_fini(&exec);
>       return r;

Reply via email to