mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 04:07:23 +00:00
26f53eb732
File::open() opens the file as O_RDONLY, which can cause issues with the VA-API driver. In particular for Intel hardware this will cause allocations to fail, as can be seen in issue #1449 for intel-media-driver. These failed allocations may or may not crash the VA-API driver, as the driver might eventually dereference a NULL pointer. Fix it by opening the DRM fd as O_RDWR. This is also in line with the examples in libva-utils. BUG=b:214478588 TEST=`cargo test --features "video-decoder,vaapi" -p devices vaapi::tests::test_get_capabilities -- --ignored` passes on AMD hardware. Change-Id: Ie3cf2a6512157a3f23f943b54249eb2928082af9 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3782999 Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: Alexandre Courbot <acourbot@chromium.org> Reviewed-by: Alexandre Courbot <acourbot@chromium.org> |
||
---|---|---|
.. | ||
ffmpeg | ||
libva | ||
libvda | ||
vp8 |