freedreno: add gmem_lock
authorRob Clark <robdclark@chromium.org>
Tue, 21 Jan 2020 23:59:22 +0000 (15:59 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Jan 2020 21:19:41 +0000 (21:19 +0000)
commitb3b1fa5e2bc4a7df3c68bb0b234d4bcf68ffaa84
tree80cf2c69ea4a5cdf5676a80d8630edf2ef248259
parent91f9bb99c5e0db38a1ac26dd9e6a967312f5e8b0
freedreno: add gmem_lock

The gmem state is split out now, so it does not require synchronization.
But gmem rendering still accesses vsc state from the context.

TODO maybe there is a better way?  For gen's that don't do vsc resizing,
this is probably easier.. but for a6xx there isn't really a great
position for more fine grained locking.  Maybe it doesn't matter since
in practice the lock shouldn't be contended.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3503>
src/gallium/drivers/freedreno/freedreno_context.c
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_gmem.c