[{"id":20309,"web_url":"https://patchwork.libcamera.org/comment/20309/","msgid":"<CAO5uPHN6MtKJcHpjJ+qbcCjH-D=xyPpmXH5OjoxzN+n5k6a1+g@mail.gmail.com>","date":"2021-10-20T01:53:01","subject":"Re: [libcamera-devel] [PATCH v2 08/12] android: camera_device: Use\n\tabortRequest() instead of open-coding it","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Umang, thank you for the patch.\n\nOn Tue, Oct 19, 2021 at 8:48 PM Umang Jain <umang.jain@ideasonboard.com> wrote:\n>\n> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> Call abortRequest() in CameraDevice::requestComplete() instead of\n> open-coding it.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n> Reviewed-by: Umang Jain<umang.jain@ideasonboard.com>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/android/camera_device.cpp | 21 ++++++---------------\n>  1 file changed, 6 insertions(+), 15 deletions(-)\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 80e11d4b..0bb547ae 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -802,6 +802,11 @@ void CameraDevice::abortRequest(Camera3RequestDescriptor *descriptor) const\n>         notifyError(descriptor->frameNumber_, nullptr, CAMERA3_MSG_ERROR_REQUEST);\n>\n>         for (auto &buffer : descriptor->buffers_) {\n> +               /*\n> +                * Signal to the framework it has to handle fences that have not\n> +                * been waited on by setting the release fence to the acquire\n> +                * fence value.\n> +                */\n>                 buffer.buffer.release_fence = buffer.buffer.acquire_fence;\n>                 buffer.buffer.acquire_fence = -1;\n>                 buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;\n> @@ -1083,21 +1088,7 @@ void CameraDevice::requestComplete(Request *request)\n>                                 << \" not successfully completed: \"\n>                                 << request->status();\n>\n> -               notifyError(descriptor->frameNumber_, nullptr,\n> -                           CAMERA3_MSG_ERROR_REQUEST);\n> -\n> -               for (auto &buffer : descriptor->buffers_) {\n> -                       /*\n> -                        * Signal to the framework it has to handle fences that\n> -                        * have not been waited on by setting the release fence\n> -                        * to the acquire fence value.\n> -                        */\n> -                       buffer.buffer.release_fence = buffer.buffer.acquire_fence;\n> -                       buffer.buffer.acquire_fence = -1;\n> -                       buffer.buffer.status = CAMERA3_BUFFER_STATUS_ERROR;\n> -               }\n> -\n> -               descriptor->status_ = Camera3RequestDescriptor::Status::Error;\n> +               abortRequest(descriptor);\n>                 sendCaptureResults();\n>\n>                 return;\n> --\n> 2.31.0\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 DB901BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 20 Oct 2021 01:53:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0CAB968F59;\n\tWed, 20 Oct 2021 03:53:14 +0200 (CEST)","from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com\n\t[IPv6:2a00:1450:4864:20::52c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BDBFD60125\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 Oct 2021 03:53:11 +0200 (CEST)","by mail-ed1-x52c.google.com with SMTP id r18so20230756edv.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Oct 2021 18:53:11 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"KqAWZEb0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=SyzllKJaoGLd30D9NW9CkepC18c1EXF+9qlKrPWKvaI=;\n\tb=KqAWZEb0TYK3YpFUhKFgMxD+u0NnDfGXKSKCB62HNKjKCVwPrqe1ebZhDfpNGniUHe\n\t/92CaGZwXwykepekUrJFnZjmlcZ9hdTEiKS7me02lQYGAot+TSD7FhhEmfuryBpWt2Wx\n\tjwTCUnQJnNHWJ042MNd/LhIQyS7aGc8kmm9JA=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=SyzllKJaoGLd30D9NW9CkepC18c1EXF+9qlKrPWKvaI=;\n\tb=FIqKUPhUhk+Oa++orR3AKy8H74eYKqWdcc8ScwddF1AdAdydN5B+v9G2FFhY9Vz3pk\n\tGDPqi/wgYf/Hj9h3B0PsOIQdyC8rv5Pe26WhKWFGZd1kGzX31HgyX79y1XlPow/kwhjW\n\tmksCKmMeCBWMb0OUAQpdWx2bmCrwnh/UnFDWIyXQO1n/bnNKlqZoj28yLyz2q5ONuXU3\n\t+hhdgTEL/luZFI6oCQIz+Qf/xsCuZcJFvfYXVm4kvXPAbuQ2TbKLJDOO68b3bQjk5tu6\n\taKUATCUNE1ooFaXOqZGFC4U/komcjhpaHcJhcRYi7CdeArZGzfOu4a5QCtB1sfn99R5i\n\tN8+g==","X-Gm-Message-State":"AOAM533xTn4blInvungT2EcU/oHhX75oKuhBTTGhOQx/FPSXJry0Yxlg\n\tHr6SiLBJElngznb13VDSM4FidvKSmFNS3Q1zFLSEJnsN/Ec=","X-Google-Smtp-Source":"ABdhPJxLRO61OVb8tY8zgoiJRGLHE6qMH2xArLadPczHAjaQ25wuTTSgcvgKdgC4c/u7aPFWCHyCVcazVPpxtNf0g9s=","X-Received":"by 2002:a17:906:1456:: with SMTP id\n\tq22mr41071094ejc.291.1634694791170; \n\tTue, 19 Oct 2021 18:53:11 -0700 (PDT)","MIME-Version":"1.0","References":"<20211019114802.665980-1-umang.jain@ideasonboard.com>\n\t<20211019114802.665980-9-umang.jain@ideasonboard.com>","In-Reply-To":"<20211019114802.665980-9-umang.jain@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Wed, 20 Oct 2021 10:53:01 +0900","Message-ID":"<CAO5uPHN6MtKJcHpjJ+qbcCjH-D=xyPpmXH5OjoxzN+n5k6a1+g@mail.gmail.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v2 08/12] android: camera_device: Use\n\tabortRequest() instead of open-coding it","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]