va: allocator: Use always lseek to get dmabuf size.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 23 Jun 2022 12:31:10 +0000 (14:31 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 24 Jun 2022 13:24:09 +0000 (15:24 +0200)
commit8a2660dc7fc9001641427994900d760e853e2d93
tree4a791b6781013c40b0d561d3d76dfa93d73ec10b
parent83c51c981222430c7a807661334c4ac65d34f7a1
va: allocator: Use always lseek to get dmabuf size.

Gallium drivers historically have reported strange dmabuf sizes, from always
zero to the whole frame (multiple fds). The simplest solution is to use lseek
SEEK_END to get the prime descriptor size.

Also the allocator raises a warning if both values differ in order to report
it to driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2574>
subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c