libv4l-rockchip_v2: limit encoder OUTPUT buffers to 2

For some reason this encoder is the only one that is not happy if we
allocate more than 2 OUTPUT buffers. https://crrev.com/c/2415911 changed
that default to 32 buffers when using DMABUF, which causes it to freeze
during flush.

Prevent this from happening by forcing the number of buffers to a
maximum of 2 on the OUTPUT queue. Interestingly the CAPTURE queue does
not suffer from this problem.

It would be better to fix this in the kernel, but since this driver in
the old kernel 4.4 is dependent on a V4L plugin and thus non-conformant
anyway, let's fix it here and let it deprecate.

BUG=b:170657091
TEST=video.EncodeAccel.h264_192p_nv12_dmabuf passes on Kevin.

Change-Id: Ie690dec8681a8b22c458015847de46c31316f35e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/libv4lplugins/+/2467564
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
1 file changed
tree: 7c66df737852487714c0118de5b77cf7ec7e6898
  1. libv4l-rockchip/
  2. libv4l-rockchip_v2/
  3. OWNERS