media/gpu/v4l2: use actual number of planes in ioctls
The Tegra V4L2 library has a bug in its handling of VIDIOC_QUERYBUF that makes it fail if the number of planes of the passed v4l2_buffer does not exactly match the number of planes of the currently set format. This CL implements a workaround by first running a VIDIOC_G_FMT ioctl in AllocateBuffers(), and then passing the returned number of planes to the buffer constructor so the correct value can be passed to VIDIOC_QUERYBUF. And since we have this value, we also use it in VIDIOC_DQBUF. BUG=893661 TEST=Checked that VDA unittest was passing on hana (Tegra devices have another bug that is fixed in the next CL). Change-Id: I830334de1cf322302fd476ac5535313ebc65900d Reviewed-on: https://chromium-review.googlesource.com/c/1275726 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:Pawel Osciak <posciak@chromium.org> Cr-Commit-Position: refs/heads/master@{#599116}
Showing
Please register or sign in to comment