From: Christian König Date: Mon, 11 May 2015 11:52:09 +0000 (+0200) Subject: drm/amdgpu: always emit GDS switch X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66782cec7ad8f48c09d96ee59b713f694265cfa1;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/amdgpu: always emit GDS switch Otherwise a process can access the GDS data of another process. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Jammy Zhou Reviewed-by: Monk Liu --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index a83ff03ffc80..f2442b2cec00 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -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,