crosvm/devices
Daniel Almeida 0967269ab5 virtio: video: vaapi: introduce try_make_progress()
Introduce try_make_progress() as a way to enforce the following
invariant between the submit and ready queues: the ready queue must
always be drained first.

This is to avoid deadlocks: draining the submit queue will fail if the
ready queue is full enough, since this prevents the deallocation of the
VASurfaces embedded in the handles stored in the ready queue.  This
means that no progress gets done.

While we are at it, make sure to call it in places where we were only
erroneously draining the submit queue (which again, means that no
progress could be made)

BUG=b:214478588
TEST="The decoder does not randomly stalls if the guest app is too slow
to retrieve frames in the ready queue"

Change-Id: I9ea34089b7df4417272cdc775d42422b865a993c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3901198
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
2022-10-28 07:10:10 +00:00
..
src virtio: video: vaapi: introduce try_make_progress() 2022-10-28 07:10:10 +00:00
tests/irqchip Extract devices integration tests 2022-10-26 17:53:08 +00:00
Cargo.toml video: decoder: vaapi: port the VAAPI backend to cros-codecs 2022-10-28 03:23:31 +00:00