pvr: fix sync waiting while using pvrsrvkm
authorSoroushIMG <soroush.kashani@imgtec.com>
Wed, 26 Apr 2023 19:46:36 +0000 (20:46 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 4 May 2023 08:42:31 +0000 (08:42 +0000)
commit57d6cb2f1e5e9b5724b4b0f8448d42fff27bcdca
treee3c79a8a32fd00ace4b17c679f6b6959dd827417
parent9e75abb61b1f926df794b6f9c365c67dc552279d
pvr: fix sync waiting while using pvrsrvkm

pvrsrvkm type sync objects can have a pending state where,
the fence is unsignaled but does not have a valid sync file
due to not yet being submitted to kernel.

The wait function therefore needs to handle these types of syncs
through a spin loop.

This was seen as crashes in dEQP-VK.synchronization.timeline_semaphore.*

Signed-off-by: SoroushIMG <soroush.kashani@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22822>
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_sync.c