freedreno: proper locking for iterating dependent batches
authorRob Clark <robdclark@gmail.com>
Mon, 20 Nov 2017 14:52:04 +0000 (09:52 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 3 Dec 2017 19:17:40 +0000 (14:17 -0500)
commitdeb57fb237c3be9629a39ef1978dfac4563d6bda
tree5fbdb02070f785338e473db017e5f5b5f40a2f58
parentef6313ffd3c0e764142ed2df87b52264bd7d4188
freedreno: proper locking for iterating dependent batches

In transfer_map(), when we need to flush batches that read from a
resource, we should be holding screen->lock to guard against race
conditions.  Somehow deferred flush seems to make this existing
race more obvious.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/freedreno_resource.c