drm/amdgpu: always sync the GFX pipe on ctx switch
authorChristian König <christian.koenig@amd.com>
Fri, 20 Dec 2024 15:21:11 +0000 (16:21 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jan 2025 16:06:50 +0000 (11:06 -0500)
That is needed to enforce isolation between contexts.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c

index d751995dc13126d478762efc8552de2b350e8ead..e0bc37557d2c2120912ab9623e3b93b47bed5d8c 100644 (file)
@@ -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)