diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-06 01:12:09 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-09-07 19:18:48 +0300 |
commit | dd8b6a2cc92b58d12845b42b1f4742482647d859 (patch) | |
tree | 06bef12f22fa9865f27b38eb84d580fb84952475 /src/android/camera_ops.h | |
parent | 71dad75373ff9348181517909557b6b1dea9058e (diff) |
cam: drm: Avoid importing the same dmabuf multiple times
When creating a DRM frame buffer, the dmabufs for the planes are
imported as GEM objects. For multi-planar formats, all planes may use
the same dmabuf, which results in multiple imports. This doesn't cause
any issue at import time, as DRM detects this situation and returns the
same GEM object. However, when destroying the frame buffer, the same GEM
object ends up being closed multiple times, which generates an error.
Fix this by avoiding multiple imports of the same dmabuf for the same
frame buffer. While the issue may theoretically occur with identical
dmabufs for different frame buffers, this is quite unlikely and is thus
not addressed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/camera_ops.h')
0 files changed, 0 insertions, 0 deletions