commit | 8aed261ba7da81fc7fa980540ee077fef5b7dc95 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Tue Oct 16 06:45:22 2018 |
committer | Alexandre Courbot <acourbot@chromium.org> | Tue Oct 16 06:45:22 2018 |
tree | 814a370a3218127cd932dc92a7c7040e0792b3b1 | |
parent | c96c54b23eb0f17e9e5c3fb6e0a84591de656170 [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-Original-Commit-Position: refs/heads/master@{#599135}(cherry picked from commit 029544dab67d79059b7610a92890091520ef7603) Reviewed-on: https://chromium-review.googlesource.com/c/1282087 Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Cr-Commit-Position: refs/branch-heads/3578@{#35} Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
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 .