CHROMIUM: Workaround arc++ sw_sync deadlock
Somehow if we pass the in-fence from surfaceflinger (a sw_sync) fence
down to the GPU driver and pass back a new GPU out-fence before the
in-fence is signaled we end up in a deadlock situation:
* drm gpu_scheduler kthread is waiting on sw_sync in-fence to
fire before queuing job on GPU
* kms atomic helper is waiting on GPU out-fence to fire
* the sw_sync in-fence never fires
This was exposed recently by 1e25f3b2825 ("android: Push in-fence-fd down to driver")
which replaced the synchronous sync_wait() with plumbing the in-fence
down to the driver. Turns out the exact same thing also happens with
vulkan.
BUG=b:225664897
TEST=run aztec ruins vk onscreen (with USE=vulkan build), run dEQP-EGL
Change-Id: I1e86fd58a9709864f595fd629f0ca01ae7333fcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/mesa/+/3546277
Tested-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olv@google.com>
Tested-by: Chia-I Wu <olv@google.com>
Reviewed-by: Kristian Kristensen <hoegsberg@chromium.org>
Commit-Queue: Kristian Kristensen <hoegsberg@chromium.org>
2 files changed