kms/dri: add mutex lock around map/unmap
authorDave Airlie <airlied@redhat.com>
Thu, 14 Jul 2022 00:34:04 +0000 (10:34 +1000)
committerMarge Bot <emma+marge@anholt.net>
Mon, 18 Jul 2022 19:06:30 +0000 (19:06 +0000)
commit50e3303b3d0484ffdc1acbc03bae8655231b19de
treebba469bfd0c077281484a09a8e0cc0fab9b21d66
parent5ee5c73d2d6bcbfa412d6bc43d2b0d645a9500aa
kms/dri: add mutex lock around map/unmap

this can get called from multiple threads with the recent llvmpipe
overlapping rendering changes, so make sure to lock around the
map/unmapping so they can't race.

This should fixes some crashes seen with kwin.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Williamson (Fedora)
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17531>
src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c