drm/amdgpu: always emit GDS switch
authorChristian König <christian.koenig@amd.com>
Mon, 11 May 2015 11:52:09 +0000 (13:52 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 4 Jun 2015 01:03:31 +0000 (21:03 -0400)
Otherwise a process can access the GDS data of another process.

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

index a83ff03..f2442b2 100644 (file)
@@ -179,7 +179,7 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
                amdgpu_vm_flush(ring, vm, ib->sync.last_vm_update);
        }
 
-       if (ring->funcs->emit_gds_switch && ib->vm && (ib->flags & AMDGPU_IB_FLAG_GDS))
+       if (vm && ring->funcs->emit_gds_switch)
                amdgpu_ring_emit_gds_switch(ring, ib->vm->ids[ring->idx].id,
                                            ib->gds_base, ib->gds_size,
                                            ib->gws_base, ib->gws_size,