virtio: video: Increase command queue size
virtio: video: Increase command queue size

The queue size defines the number of available descriptors, that can be
used for exchanging messages between guest and hypervisor. Each
virtio-video command uses at least 1 descriptor (eg. CMD_QUEUE uses 2).
The amount of descriptors in use depends on the number of sessions and
buffers in input and output video queue.
In the worst case scenario the peak number can reach over 672 for 8
simultaneous streams, with 26 + 16 buffers each just for CMD_QUEUE
commands alone.

If the entire queue is overfilled with CMD_QUEUE for OUTPUT queue only,
the driver has no free descriptors for INPUT queue buffers. This leads
to encoder/decoder starvation, hence no OUTPUT buffer can be produced
and no CMD_QUEUE will finish, which leads to dead locking the device.

This patch increases the queue size with consideration of above details
with some headroom to avoid driver's deadlock.

BUG=b:204055006
TEST=App from https://github.com/chromeos/video-decode-encode-demo.git
with 8 simultaneous stream runs without blocking the device.

Change-Id: If51e340dd501b5b261518fba23fc541e3b55af8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606869
Reviewed-by: Dmitry Torokhov <10a8c465cefc9bdd6c925e26964d23c90f1141cc@chromium.org>
Reviewed-by: Emilie Roberts <a050795ea391176491d0dd44b10c3fc068b4226d@google.com>
Reviewed-by: Chih-Yu Huang <f815e8cb2f117b8947610323682cb280404b8de3@chromium.org>
Commit-Queue: Marcin Wojtas <c8aec9540db2bc3d470a920c79a4dd5aa7ac055d@google.com>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>

google/crosvm,google/crosvm,google/crosvm,google/crosvm