freedreno: Fix FD_MESA_DEBUG=flush debug option
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Tue, 22 Dec 2020 19:23:36 +0000 (21:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 23 Dec 2020 09:25:33 +0000 (09:25 +0000)
commita6bdbd5c0f45816d622d5b9e94449b0b929afbb0
treef43789399b44bae50b42bcac0844e1adf1ddc423
parent00c30420cb358d17dab0c6e64cb9937351f08ee7
freedreno: Fix FD_MESA_DEBUG=flush debug option

fd_batch_check_size() should be after fd_batch_unlock_submit(),
otherwise batch_flush() called from fd_batch_check_size()
would wait on mutex forever.

Fixes: 02298ed1 "freedreno: Add submit lock"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8205>
src/gallium/drivers/freedreno/freedreno_draw.c