drm/amdgpu: install ctx entities with cmpxchg
authorChristian König <christian.koenig@amd.com>
Wed, 23 Feb 2022 13:35:31 +0000 (14:35 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Mar 2022 18:03:30 +0000 (13:03 -0500)
commitd18b8eadd83e3d8d63a45f9479478640dbcfca02
tree8f2a8ce9b4f32f9a0ad8d60cdd4d0f206eaf35c1
parentb664a56e8626264276ee27edf949e748f6be52de
drm/amdgpu: install ctx entities with cmpxchg

Since we removed the context lock we need to make sure that not two threads
are trying to install an entity at the same time.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 461fa7b0ac565e ("drm/amdgpu: remove ctx->lock")
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c