[{"id":32549,"web_url":"https://patchwork.libcamera.org/comment/32549/","msgid":"<sd7nwmrtvnmittbmn6blnqvj5cw7an6uo7ipmuqbel7blvazgt@zblsvyidohmh>","date":"2024-12-05T16:46:26","subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"On Wed, Dec 04, 2024 at 04:36:31PM +0000, Harvey Yang wrote:\n> When a request hasn't done any processing, CAMERA3_MSG_ERROR_REQUEST and\n> the following process_capture_result don't need to wait for the previous\n> requests' completion. This patch avoids pushing the aborted requests\n> into the request queue.\n>\n> Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n> Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>\n> Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> ---\n>  src/android/camera_device.cpp | 11 +++--------\n>  1 file changed, 3 insertions(+), 8 deletions(-)\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index dd2c603e0..18e974f56 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -867,6 +867,8 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const\n>  \t\tbuffer.status = StreamBuffer::Status::Error;\n>\n>  \tdescriptor->status_ = Camera3RequestDescriptor::Status::Error;\n> +\n> +\tsendCaptureResult(descriptor);\n>  }\n>\n>  bool CameraDevice::isValidRequest(camera3_capture_request_t *camera3Request) const\n> @@ -1136,14 +1138,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>  \tMutexLocker stateLock(stateMutex_);\n>\n>  \tif (state_ == State::Flushing) {\n> -\t\tCamera3RequestDescriptor *rawDescriptor = descriptor.get();\n> -\t\t{\n> -\t\t\tMutexLocker descriptorsLock(descriptorsMutex_);\n> -\t\t\tdescriptors_.push(std::move(descriptor));\n> -\t\t}\n> -\t\tabortRequest(rawDescriptor);\n> -\t\tcompleteDescriptor(rawDescriptor);\n> -\n> +\t\tabortRequest(descriptor.get());\n\nRight, if we don't have to complete in order this indeed seems\ncorrect.\n\nHowever, we fall in this case, right ?\n\n     * 2. For pending requests that have not done any processing, the HAL must call notify\n     *    CAMERA3_MSG_ERROR_REQUEST, and return all the output buffers with\n     *    process_capture_result in the error state (CAMERA3_BUFFER_STATUS_ERROR).\n     *    The HAL must not place the release fence into an error state, instead,\n     *    the release fences must be set to the acquire fences passed by the framework,\n     *    or -1 if they have been waited on by the HAL already. This is also the path\n     *    to follow for any captures for which the HAL already called notify() with\n     *    CAMERA3_MSG_SHUTTER but won't be producing any metadata/valid buffers for.\n     *    After CAMERA3_MSG_ERROR_REQUEST, for a given frame, only process_capture_results with\n     *    buffers in CAMERA3_BUFFER_STATUS_ERROR are allowed. No further notifys or\n     *    process_capture_result with non-null metadata is allowed.\n\nApparently we're not handling fences here. Not your fault, seems like\nit wasn't there already. While at it could you add a \\todo or, if you\nfeel like it's worth fixing it, pile up a patch ?\n\nThe patch itself seems good to me\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\n>  \t\treturn 0;\n>  \t}\n>\n> --\n> 2.47.0.338.g60cca15819-goog\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C03CBC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  5 Dec 2024 16:46:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A178C6610E;\n\tThu,  5 Dec 2024 17:46:31 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05E6066107\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  5 Dec 2024 17:46:29 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0BDD37E2;\n\tThu,  5 Dec 2024 17:46:01 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RwFyhd/m\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733417161;\n\tbh=XzMXM2NexnM0jcvDmH7dSoyXnXvnutlKD/CjaUhZxJk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RwFyhd/m1VMedayeyT8xrl5LyQ05P3xyqMhb8J36ca/0Cj+S/sCXVYFWOA5ovL8oF\n\teP5ddgsaDRLt18q8CBB2NEDnvXm5qIA4nteJ2SDlffAuVNp3AVVPk+EBtceCEOErSe\n\t4qQWwiuuQyE3uHB+GnUL2yqyRFdDWQqIqdzz6c+w=","Date":"Thu, 5 Dec 2024 17:46:26 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Harvey Yang <chenghaoyang@chromium.org>","Cc":"libcamera-devel@lists.libcamera.org, \n\tHan-Lin Chen <hanlinchen@chromium.org>","Subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","Message-ID":"<sd7nwmrtvnmittbmn6blnqvj5cw7an6uo7ipmuqbel7blvazgt@zblsvyidohmh>","References":"<20241204164137.3938891-1-chenghaoyang@chromium.org>\n\t<20241204164137.3938891-7-chenghaoyang@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20241204164137.3938891-7-chenghaoyang@chromium.org>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32648,"web_url":"https://patchwork.libcamera.org/comment/32648/","msgid":"<CAEB1ahv_1zNDdVXsgirbSoRd=i7zFHiOV1sNwETUmmroNcGxVw@mail.gmail.com>","date":"2024-12-10T05:40:14","subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","submitter":{"id":117,"url":"https://patchwork.libcamera.org/api/people/117/","name":"Cheng-Hao Yang","email":"chenghaoyang@chromium.org"},"content":"Hi Jacopo,\n\nOn Fri, Dec 6, 2024 at 12:46 AM Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> On Wed, Dec 04, 2024 at 04:36:31PM +0000, Harvey Yang wrote:\n> > When a request hasn't done any processing, CAMERA3_MSG_ERROR_REQUEST and\n> > the following process_capture_result don't need to wait for the previous\n> > requests' completion. This patch avoids pushing the aborted requests\n> > into the request queue.\n> >\n> > Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n> > Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>\n> > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> > ---\n> >  src/android/camera_device.cpp | 11 +++--------\n> >  1 file changed, 3 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > index dd2c603e0..18e974f56 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -867,6 +867,8 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const\n> >               buffer.status = StreamBuffer::Status::Error;\n> >\n> >       descriptor->status_ = Camera3RequestDescriptor::Status::Error;\n> > +\n> > +     sendCaptureResult(descriptor);\n> >  }\n> >\n> >  bool CameraDevice::isValidRequest(camera3_capture_request_t *camera3Request) const\n> > @@ -1136,14 +1138,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n> >       MutexLocker stateLock(stateMutex_);\n> >\n> >       if (state_ == State::Flushing) {\n> > -             Camera3RequestDescriptor *rawDescriptor = descriptor.get();\n> > -             {\n> > -                     MutexLocker descriptorsLock(descriptorsMutex_);\n> > -                     descriptors_.push(std::move(descriptor));\n> > -             }\n> > -             abortRequest(rawDescriptor);\n> > -             completeDescriptor(rawDescriptor);\n> > -\n> > +             abortRequest(descriptor.get());\n>\n> Right, if we don't have to complete in order this indeed seems\n> correct.\n>\n> However, we fall in this case, right ?\n>\n>      * 2. For pending requests that have not done any processing, the HAL must call notify\n>      *    CAMERA3_MSG_ERROR_REQUEST, and return all the output buffers with\n>      *    process_capture_result in the error state (CAMERA3_BUFFER_STATUS_ERROR).\n>      *    The HAL must not place the release fence into an error state, instead,\n>      *    the release fences must be set to the acquire fences passed by the framework,\n>      *    or -1 if they have been waited on by the HAL already. This is also the path\n>      *    to follow for any captures for which the HAL already called notify() with\n>      *    CAMERA3_MSG_SHUTTER but won't be producing any metadata/valid buffers for.\n>      *    After CAMERA3_MSG_ERROR_REQUEST, for a given frame, only process_capture_results with\n>      *    buffers in CAMERA3_BUFFER_STATUS_ERROR are allowed. No further notifys or\n>      *    process_capture_result with non-null metadata is allowed.\n>\n> Apparently we're not handling fences here. Not your fault, seems like\n> it wasn't there already. While at it could you add a \\todo or, if you\n> feel like it's worth fixing it, pile up a patch ?\n\nYes we fall into this case, while I think the original logic already\nhandles the fence as described?\nIn `CameraDevice::sendCaptureResults()` (or\n`CameraDevice::sendCaptureResult()` in my patches),\n`buffer.fence.release()` is put in the `release_fence` field of\n`camera3_steram_buffer_t`.\n\nPlease check if I missed anything.\n\nBR,\nHarvey\n\n\n>\n> The patch itself seems good to me\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n>\n> >               return 0;\n> >       }\n> >\n> > --\n> > 2.47.0.338.g60cca15819-goog\n> >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AFF3DC32CE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Dec 2024 05:40:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AB68667E7A;\n\tTue, 10 Dec 2024 06:40:27 +0100 (CET)","from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com\n\t[IPv6:2a00:1450:4864:20::22d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A0D36618AC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Dec 2024 06:40:26 +0100 (CET)","by mail-lj1-x22d.google.com with SMTP id\n\t38308e7fff4ca-30033e07ef3so38116791fa.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 09 Dec 2024 21:40:26 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"VbCXNybw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1733809226; x=1734414026;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=WtWESy2fdJHbd8jJtHhjEVHCcCvkp09FBChx/JMkg3o=;\n\tb=VbCXNybwgGAOmicL7rm27CS/HZJqxHb4WzO2ik0Dnon3YW3zOyXpC+yj94EuHSEElJ\n\tjdc85iZaVG/+bCZmH7vzTAdwuCJiC8ZNU+INKiAGOpNI6yW+DhItUkJMV61XHnOmnMp3\n\tyDybE+M1ruACgHQRn54rjAOC7lEGX2OvVpddI=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1733809226; x=1734414026;\n\th=content-transfer-encoding:cc:to:subject:message-id:date:from\n\t:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=WtWESy2fdJHbd8jJtHhjEVHCcCvkp09FBChx/JMkg3o=;\n\tb=nYq5jgt9lpqy4upNC0PGXzklEUEejgLV8qM4Hz1u6Oc4WEhpnnDZVslyYv1lClIbPe\n\t3R74gZYH4OxN8qsOxL/Tw0zt3zjgRF5mpB2yYHDytqLGJv3WdhPg1UbCQ6XO/A+q9SU9\n\tWGSSOBG9zwJZzNdni6w7K+lDAhJHmq/YN6Y7shocVyzu8RK/TSUMPNlJgjz4jKIQxRLp\n\tdggAuigW/evu550Hf+Cp6xpIXl0SYABo8zt9rUB4rr9x89PR5sjp850ibbWCkAR/w017\n\tBw8QieN7LX3eqp2jfQizeR0mP4zaYbPM6MQTSoGtJ7jWfYKMay2+Qj3DGAmeM3HN76SG\n\tjvWw==","X-Gm-Message-State":"AOJu0YyGPBq+HziXyK9bknUxdB//gZMVTUJpwOI4Z8DFeeR+3g1o+V4H\n\tYQaSZbOT+gfLsN9lJn01jV1jqRAdkEyBqm4FXQ895vU5CrGF/3QJvumzb8vYy3IRelJOSD7nxh7\n\tGwu/veHEF0P6TzhP9ExtTKn57LjLSENuACQEm","X-Gm-Gg":"ASbGncvz8j1XaJtZFaKRYlkZtoPgiGbCbKvRKQaM7lGuqRIDgLKT/xqZ0nkk2e3Xxdi\n\tQ3BTXv0XMuh4xFTSNnY9TnV+hi/FUcll6AXEk5ZHzxxg1nM7N2vy+wCLo2fEFqw==","X-Google-Smtp-Source":"AGHT+IE7Hyt1fO0IguGsxG/VMkn3Nca1HZTrYPLOFouhXEDd4qQZsw3lQ9/f0gC/YuBnreFfiQVSy5gUG0BVPg4gnmU=","X-Received":"by 2002:a05:651c:2124:b0:300:41e3:c6e8 with SMTP id\n\t38308e7fff4ca-30232827d36mr6923391fa.2.1733809225769; Mon, 09 Dec 2024\n\t21:40:25 -0800 (PST)","MIME-Version":"1.0","References":"<20241204164137.3938891-1-chenghaoyang@chromium.org>\n\t<20241204164137.3938891-7-chenghaoyang@chromium.org>\n\t<sd7nwmrtvnmittbmn6blnqvj5cw7an6uo7ipmuqbel7blvazgt@zblsvyidohmh>","In-Reply-To":"<sd7nwmrtvnmittbmn6blnqvj5cw7an6uo7ipmuqbel7blvazgt@zblsvyidohmh>","From":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Date":"Tue, 10 Dec 2024 13:40:14 +0800","Message-ID":"<CAEB1ahv_1zNDdVXsgirbSoRd=i7zFHiOV1sNwETUmmroNcGxVw@mail.gmail.com>","Subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, \n\tHan-Lin Chen <hanlinchen@chromium.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":32650,"web_url":"https://patchwork.libcamera.org/comment/32650/","msgid":"<utllqtiqoask6bionxg322xieasiulbgfu2ampfczgp3fgu5gj@7ehl4tsr33nm>","date":"2024-12-10T08:36:03","subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Harvey\n\nOn Tue, Dec 10, 2024 at 01:40:14PM +0800, Cheng-Hao Yang wrote:\n> Hi Jacopo,\n>\n> On Fri, Dec 6, 2024 at 12:46 AM Jacopo Mondi\n> <jacopo.mondi@ideasonboard.com> wrote:\n> >\n> > On Wed, Dec 04, 2024 at 04:36:31PM +0000, Harvey Yang wrote:\n> > > When a request hasn't done any processing, CAMERA3_MSG_ERROR_REQUEST and\n> > > the following process_capture_result don't need to wait for the previous\n> > > requests' completion. This patch avoids pushing the aborted requests\n> > > into the request queue.\n> > >\n> > > Signed-off-by: Han-Lin Chen <hanlinchen@chromium.org>\n> > > Co-developed-by: Harvey Yang <chenghaoyang@chromium.org>\n> > > Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>\n> > > ---\n> > >  src/android/camera_device.cpp | 11 +++--------\n> > >  1 file changed, 3 insertions(+), 8 deletions(-)\n> > >\n> > > diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> > > index dd2c603e0..18e974f56 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -867,6 +867,8 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const\n> > >               buffer.status = StreamBuffer::Status::Error;\n> > >\n> > >       descriptor->status_ = Camera3RequestDescriptor::Status::Error;\n> > > +\n> > > +     sendCaptureResult(descriptor);\n> > >  }\n> > >\n> > >  bool CameraDevice::isValidRequest(camera3_capture_request_t *camera3Request) const\n> > > @@ -1136,14 +1138,7 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n> > >       MutexLocker stateLock(stateMutex_);\n> > >\n> > >       if (state_ == State::Flushing) {\n> > > -             Camera3RequestDescriptor *rawDescriptor = descriptor.get();\n> > > -             {\n> > > -                     MutexLocker descriptorsLock(descriptorsMutex_);\n> > > -                     descriptors_.push(std::move(descriptor));\n> > > -             }\n> > > -             abortRequest(rawDescriptor);\n> > > -             completeDescriptor(rawDescriptor);\n> > > -\n> > > +             abortRequest(descriptor.get());\n> >\n> > Right, if we don't have to complete in order this indeed seems\n> > correct.\n> >\n> > However, we fall in this case, right ?\n> >\n> >      * 2. For pending requests that have not done any processing, the HAL must call notify\n> >      *    CAMERA3_MSG_ERROR_REQUEST, and return all the output buffers with\n> >      *    process_capture_result in the error state (CAMERA3_BUFFER_STATUS_ERROR).\n> >      *    The HAL must not place the release fence into an error state, instead,\n> >      *    the release fences must be set to the acquire fences passed by the framework,\n> >      *    or -1 if they have been waited on by the HAL already. This is also the path\n> >      *    to follow for any captures for which the HAL already called notify() with\n> >      *    CAMERA3_MSG_SHUTTER but won't be producing any metadata/valid buffers for.\n> >      *    After CAMERA3_MSG_ERROR_REQUEST, for a given frame, only process_capture_results with\n> >      *    buffers in CAMERA3_BUFFER_STATUS_ERROR are allowed. No further notifys or\n> >      *    process_capture_result with non-null metadata is allowed.\n> >\n> > Apparently we're not handling fences here. Not your fault, seems like\n> > it wasn't there already. While at it could you add a \\todo or, if you\n> > feel like it's worth fixing it, pile up a patch ?\n>\n> Yes we fall into this case, while I think the original logic already\n> handles the fence as described?\n> In `CameraDevice::sendCaptureResults()` (or\n> `CameraDevice::sendCaptureResult()` in my patches),\n> `buffer.fence.release()` is put in the `release_fence` field of\n> `camera3_steram_buffer_t`.\n>\n> Please check if I missed anything.\n\nYes, you're right there even is a comment here\n\n        /*\n         * Pass the buffer fence back to the camera framework as\n         * a release fence. This instructs the framework to wait\n         * on the acquire fence in case we haven't done so\n         * ourselves for any reason.\n         */\n\nAnd I have checked the call stack and confirmed that once a Fence is\nwaited on by the library, it is reset to -1 so the Android specs\nshould be respected here.\n\n>\n> BR,\n> Harvey\n>\n>\n> >\n> > The patch itself seems good to me\n> > Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nStill holds indeed\n\nThanks\n  j\n\n> >\n> > >               return 0;\n> > >       }\n> > >\n> > > --\n> > > 2.47.0.338.g60cca15819-goog\n> > >","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 12D98C32CE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Dec 2024 08:36:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A47F67E80;\n\tTue, 10 Dec 2024 09:36:09 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F3ADC608B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Dec 2024 09:36:07 +0100 (CET)","from ideasonboard.com (mob-5-90-141-199.net.vodafone.it\n\t[5.90.141.199])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 96554752;\n\tTue, 10 Dec 2024 09:35:35 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"D15SvARr\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1733819735;\n\tbh=E4Wh7TXtMntbld5JL6U3dIZEt7WwzfSGe5bLI44JjkQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=D15SvARrDVZjEF1LHW1mk3CTIkTkUkWVYm8fIMXDLSVFIxu9Jpgd9WvVu5mDxvjDR\n\tjW+PVVOhZX7P1FNASJ47oiLZSW6ds6WydhQMTUpLBg0RRkIM+7pCwcziT1DzTa21ST\n\ti05cVi1RgueneNRClmr9IYrpCg3yPg69ee96HtHI=","Date":"Tue, 10 Dec 2024 09:36:03 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Cheng-Hao Yang <chenghaoyang@chromium.org>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tlibcamera-devel@lists.libcamera.org,\n\tHan-Lin Chen <hanlinchen@chromium.org>","Subject":"Re: [PATCH v3 6/7] android: notify CAMERA3_MSG_ERROR_REQUEST out of\n\torder","Message-ID":"<utllqtiqoask6bionxg322xieasiulbgfu2ampfczgp3fgu5gj@7ehl4tsr33nm>","References":"<20241204164137.3938891-1-chenghaoyang@chromium.org>\n\t<20241204164137.3938891-7-chenghaoyang@chromium.org>\n\t<sd7nwmrtvnmittbmn6blnqvj5cw7an6uo7ipmuqbel7blvazgt@zblsvyidohmh>\n\t<CAEB1ahv_1zNDdVXsgirbSoRd=i7zFHiOV1sNwETUmmroNcGxVw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<CAEB1ahv_1zNDdVXsgirbSoRd=i7zFHiOV1sNwETUmmroNcGxVw@mail.gmail.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]