android: camera_stream: Don't close fence if wait fails
The camera HAL APIs requires that any acquire fence that hasn't been waited on to be sent back to the framework as a release fence. The CameraDevice already copies the acquire fence to the release fence when signaling request completion, but the CameraStream incorrectly closes the fence when a wait fails and sets it to -1. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
e82d7e4767
commit
5f4f444aed
1 changed files with 6 additions and 6 deletions
|
@ -147,16 +147,16 @@ int CameraStream::process(const FrameBuffer &source,
|
||||||
Camera3RequestDescriptor *request)
|
Camera3RequestDescriptor *request)
|
||||||
{
|
{
|
||||||
/* Handle waiting on fences on the destination buffer. */
|
/* Handle waiting on fences on the destination buffer. */
|
||||||
int fence = dest.fence;
|
if (dest.fence != -1) {
|
||||||
if (fence != -1) {
|
int ret = waitFence(dest.fence);
|
||||||
int ret = waitFence(fence);
|
|
||||||
::close(fence);
|
|
||||||
dest.fence = -1;
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
LOG(HAL, Error) << "Failed waiting for fence: "
|
LOG(HAL, Error) << "Failed waiting for fence: "
|
||||||
<< fence << ": " << strerror(-ret);
|
<< dest.fence << ": " << strerror(-ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::close(dest.fence);
|
||||||
|
dest.fence = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!postProcessor_)
|
if (!postProcessor_)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue