[PATCH] drm/amdgpu: always sync the GFX pipe on ctx switch

Alex Deucher alexdeucher at gmail.com
Wed Jan 8 14:23:37 UTC 2025


On Wed, Jan 8, 2025 at 4:52 AM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> That is needed to enforce isolation between contexts.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index d751995dc131..e0bc37557d2c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -191,8 +191,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
>         need_ctx_switch = ring->current_ctx != fence_ctx;
>         if (ring->funcs->emit_pipeline_sync && job &&
>             ((tmp = amdgpu_sync_get_fence(&job->explicit_sync)) ||
> -            (amdgpu_sriov_vf(adev) && need_ctx_switch) ||
> -            amdgpu_vm_need_pipeline_sync(ring, job))) {
> +            need_ctx_switch || amdgpu_vm_need_pipeline_sync(ring, job))) {
> +
>                 need_pipe_sync = true;
>
>                 if (tmp)
> --
> 2.34.1
>


More information about the amd-gfx mailing list