virgl: Only PIPE_BUFFER with VIRGL_BIND_CUSTOM flag is considered busy during creation
authorFeng Jiang <jiangfeng@kylinos.cn>
Wed, 17 Aug 2022 01:54:09 +0000 (09:54 +0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 09:46:40 +0000 (09:46 +0000)
commitd7fa2561a5e31b22b84b5735e2cdcbe27b8a7dfb
tree112c41b0242075fbcfea4a0dcbe8fd709f3aaf5d
parent95db3e87fee377c5fa8fb779bc151e8d7f4e790a
virgl: Only PIPE_BUFFER with VIRGL_BIND_CUSTOM flag is considered busy during creation

When the virglrenderer performs the attach action for the PIPE_BUFFER
with the VIRGL_BIND_CUSTOM flag, it will synchronize the data from
res->ptr to res->iov, at this time we need to treat it as busy,
otherwise it will cause some race conditions.

This optimizes commit:
fe9333f7b5e ("virgl: Set res->maybe_busy to true when creating resources")

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18098>
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c