drm/nouveau/fifo/gk104: fix race condition when updating engine runlists
authorBen Skeggs <bskeggs@redhat.com>
Tue, 10 Nov 2015 23:37:05 +0000 (09:37 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 11 Jan 2016 01:17:40 +0000 (11:17 +1000)
commit386ffd5e80d54fd6ecca0a81fc50abc97aeee73f
tree8c36ef1fd8e7c13966df4904a1b120ad776acad8
parentcfb4f929f7f8716af4de085da1d3881384644b81
drm/nouveau/fifo/gk104: fix race condition when updating engine runlists

The CPU-side tracking of engine runlists was not protected by a lock,
leading to list corruption, eventually causing runlist_update() to
overrun the GPU-side runlist, triggering an OOPS.

Fixes some of the issues noticed during parallel piglit runs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gpfifogk104.c