winsys/amdgpu: fix a race condition between fence updates and IB submissions
authorMarek Olšák <marek.olsak@amd.com>
Thu, 29 Dec 2016 12:41:42 +0000 (13:41 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 6 Jan 2017 20:05:48 +0000 (21:05 +0100)
commitb7699ce07cb508e461a4fc6662b8fd0c5e6f0243
tree7ad0bd6746774a09194de91400e3a36d48c13a38
parentece6e1f65804556de3a67a482b4ef9680f57c793
winsys/amdgpu: fix a race condition between fence updates and IB submissions

The CS thread is needed to ensure proper ordering of operations and can't
be disabled (without complicating the code).

Discovered by Nine CSMT, which ended up in a deadlock.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c