freedreno/drm: Avoid CPU_PREP ioctl if bo is idle
authorRob Clark <robdclark@chromium.org>
Thu, 10 Feb 2022 17:31:16 +0000 (09:31 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 25 Mar 2022 02:03:30 +0000 (02:03 +0000)
commit88a10c621689b801e46aad82c38b2ed7ee1a560c
treebd8e2dc1e6eacb608533aa05e81868656c7c60b6
parent9bcc98325602a47e30fcac7016c60748f2ba0c19
freedreno/drm: Avoid CPU_PREP ioctl if bo is idle

With userspace fences, if we know definitely that the buffer is idle
(which implies that it is not shared with other processes, etc), then
skip the ioctl.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14900>
src/freedreno/drm/freedreno_bo.c