frontends/va: Fix locking in vlVaBeginPicture
authorDavid Rosca <nowrep@gmail.com>
Fri, 20 Oct 2023 08:27:41 +0000 (10:27 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 20 Oct 2023 15:14:41 +0000 (15:14 +0000)
commit2c1dff3851dfa98c7c76a34fadd65c76400e7c81
tree33fc0a395acf79d9893101b0f67393be5efa5f67
parentc70687afe7a6e972b9d799c2a994195be62d8fcc
frontends/va: Fix locking in vlVaBeginPicture

The assert in vlVaSetSurfaceContext would very rarely fail because
the mutex was already unlocked when calling this function from
vlVaBeginPicture.

Keep the lock until returning from vlVaBeginPicture, as that's what
other functions are already doing.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25823>
src/gallium/frontends/va/picture.c