freedreno: re-work fd_batch_reference() locking
authorRob Clark <robdclark@gmail.com>
Tue, 17 Jul 2018 14:14:59 +0000 (10:14 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 17 Jul 2018 15:00:00 +0000 (11:00 -0400)
commit4cf8f329edb3ad3482819de8dc091061ae19c5af
tree00bc5e4c414b9a4ae87e254de050c548d1243848
parent4b847b38ae3cfd2bacc2fd5b01478046796c52bf
freedreno: re-work fd_batch_reference() locking

Annoyingly we still have to briefly drop the lock to unref resources..
but push the lock down into __fd_batch_destroy() so we can invalidate
the batch and reset resources before dropping the lock.

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