commit | 029544dab67d79059b7610a92890091520ef7603 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Fri Oct 12 07:54:06 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Oct 12 07:54:06 2018 |
tree | 7e949c5198c7a8902716453eaa7df88cbdc89b0d | |
parent | df554d02051d43d493d30cdf39fb1ee7566355bf [diff] |
media/gpu/v4l2: workaround VIDIOC_G_FMT bug in libtegrav4l2.so. libtegrav4l2.so's implementation of V4L2_G_FMT has a bug which will make it return 0 planes for single-plane multiplanar formats. We obviously cannot have a multiplanar format with 0 planes, so add a workaround at the fake-ioctl level. Implement it as a case-switch for future-proofing against other workarounds we will likely have to add. Also add a few recommendations in v4l2_device.cc against the temptation to spare some memory by using an appropriately-sized array of v4l2_planes: it turns out libv4l2 also likes to write above the number of passed planes, and using anything shorter than VIDEO_MAX_PLANES will result in memory corruption DCHECKS being raised. BUG=893661 TEST=Checked that VDA unittest was passing on both hana and nyan_big. Change-Id: I7ea638f19f5bf0bdfaa0a47885577eb9dec4c225 Reviewed-on: https://chromium-review.googlesource.com/c/1275727 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Kuang-che Wu <kcwu@chromium.org> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Cr-Commit-Position: refs/heads/master@{#599135}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .