[{"id":15636,"web_url":"https://patchwork.libcamera.org/comment/15636/","msgid":"<YEv32yTWMWsax/Nc@bismarck.dyn.berto.se>","date":"2021-03-12T23:23:07","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Kieran,\n\nOn 2021-03-12 05:47:22 +0000, Kieran Bingham wrote:\n> Buffers queued to a pipeline handler may not be yet queued to a device\n> when the request is cancelled.\n> \n> This can lead to the FrameMetadata having never been explicitly set by\n> an underlying V4L2 device.\n> \n> The status field on this is used to check the state of the buffer to\n> determine if it was correctly filled, or if it was cancelled.\n> \n> In the event that the buffer is not used, it must be marked as Error as\n> the metadata associated with that frame will not be valid.\n> \n> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n> Furthermore, swap the Enum values of the Status such that the first\n> state represents the initial Error state.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nI like this patch and I fear it could expose issues, have it been tested \nwith all supported pipelines? In either case I think it's the right \nthing.\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  include/libcamera/buffer.h | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index 302fe3d3e86b..3f5d0f1b6363 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -19,8 +19,8 @@ class Request;\n>  \n>  struct FrameMetadata {\n>  \tenum Status {\n> -\t\tFrameSuccess,\n>  \t\tFrameError,\n> +\t\tFrameSuccess,\n>  \t\tFrameCancelled,\n>  \t};\n>  \n> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>  \t\tunsigned int bytesused;\n>  \t};\n>  \n> -\tStatus status;\n> +\tStatus status = FrameError;\n>  \tunsigned int sequence;\n>  \tuint64_t timestamp;\n>  \tstd::vector<Plane> planes;\n> -- \n> 2.25.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 8CB4EBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Mar 2021 23:23:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0136668C68;\n\tSat, 13 Mar 2021 00:23:09 +0100 (CET)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82997602E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Mar 2021 00:23:08 +0100 (CET)","by mail-wr1-x429.google.com with SMTP id y16so5688641wrw.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Mar 2021 15:23:08 -0800 (PST)","from localhost (p54ac5521.dip0.t-ipconnect.de. [84.172.85.33])\n\tby smtp.gmail.com with ESMTPSA id\n\tc9sm3825778wml.42.2021.03.12.15.23.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 12 Mar 2021 15:23:07 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"xkTg6rbw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=TVBN85ZP3eyygbiVUqAS7PpEqUg7pHaPNazVr6rUc3w=;\n\tb=xkTg6rbwYeLyVnHqKEW3kTHAY3MOX9e11vJfqjJeftb/yKLPgKaUusL6twobuW1vbU\n\tOaZ8JomcR8PcXiuOF7PBKC0gMuQCXEQgF+8o434vQpMRmoBgaXzIHm59WXFWILdNUyyC\n\t9dGgi0Mu5mCKpoubqbAkN1ILd+N1EEHYgEOCac97/q5t5lKcMtXci0A+oc8/UuLxox54\n\ts+u28VbTg6mDsQ3mj8gOlQQvIrpIFfloQ06TFW6GI99hlxOpJ1m5ToIG3gEs+qJG5ADB\n\tBBDBoU4VYhztRSVL+SEsugn1nttkCzI917Uu8024FWiE6Z5vtXBgREDdchr9rUEuclsV\n\t/3ZQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=TVBN85ZP3eyygbiVUqAS7PpEqUg7pHaPNazVr6rUc3w=;\n\tb=f3k3erwuUNshQY6MFAovIbj+I9M6kv9pDTfgtV6HoKjvCZtZry2cfKcchGA5yrDGb7\n\tb1yS7/5OqlDsK+ZX4ou8UFMJ1EoRSfV/Wg8ygEX9JBBzkDBxWyxElyujiVw+vHkID19W\n\t8xr12DxzyqQiVW29HaSDk/XD5tZECld+/08x0kh5Ng2lIKL0ILpwGjYIHuguG4P8qwdY\n\t66sFtZ3wvsU4WBRZ31szedp0hXu4F5yOTV3FBM17JUVnvtC2MYzOEZ6H7z/O5Uu5PjDa\n\tuIQq2lDqxwpW2R9XmVv1vJ4BGeAwJQTzGQxeJgHtArzZA8sUgqBono6Qgy1wEyI1xA6P\n\tuIjg==","X-Gm-Message-State":"AOAM531vc63UOPEm27s2BKAdItwafjvND1b34X2m7psXbM1T+QY1Zxb5\n\taN+i6/FiH9gPc5Ud/GCh4irkOjvrmRrnxMDn","X-Google-Smtp-Source":"ABdhPJxqLzxE5JZFULCaH2hXwWzTNV9ntV/eBTSp5vcx6bCzbwqrepRY/0SA/azP3oXTJVpnCKpMhg==","X-Received":"by 2002:a5d:6cab:: with SMTP id\n\ta11mr16303724wra.419.1615591388183; \n\tFri, 12 Mar 2021 15:23:08 -0800 (PST)","Date":"Sat, 13 Mar 2021 00:23:07 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YEv32yTWMWsax/Nc@bismarck.dyn.berto.se>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15646,"web_url":"https://patchwork.libcamera.org/comment/15646/","msgid":"<20210313093024.ncgpdm6qq5skg4ww@uno.localdomain>","date":"2021-03-13T09:30:24","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Fri, Mar 12, 2021 at 05:47:22AM +0000, Kieran Bingham wrote:\n> Buffers queued to a pipeline handler may not be yet queued to a device\n> when the request is cancelled.\n>\n> This can lead to the FrameMetadata having never been explicitly set by\n> an underlying V4L2 device.\n>\n> The status field on this is used to check the state of the buffer to\n> determine if it was correctly filled, or if it was cancelled.\n>\n> In the event that the buffer is not used, it must be marked as Error as\n> the metadata associated with that frame will not be valid.\n>\n> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n> Furthermore, swap the Enum values of the Status such that the first\n> state represents the initial Error state.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nProbably a test from users of RkISP1 and simple pipeline would solve\nNiklas' concerns which I do share as some code paths might bet of the\nfact that the status is set to FrameSuccess on construction.\n\n> ---\n>  include/libcamera/buffer.h | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index 302fe3d3e86b..3f5d0f1b6363 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -19,8 +19,8 @@ class Request;\n>\n>  struct FrameMetadata {\n>  \tenum Status {\n> -\t\tFrameSuccess,\n>  \t\tFrameError,\n> +\t\tFrameSuccess,\n>  \t\tFrameCancelled,\n>  \t};\n>\n> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>  \t\tunsigned int bytesused;\n>  \t};\n>\n> -\tStatus status;\n> +\tStatus status = FrameError;\n>  \tunsigned int sequence;\n>  \tuint64_t timestamp;\n>  \tstd::vector<Plane> planes;\n> --\n> 2.25.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 493CEBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Mar 2021 09:29:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C191E68C67;\n\tSat, 13 Mar 2021 10:29:55 +0100 (CET)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 69CE6602E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Mar 2021 10:29:54 +0100 (CET)","from uno.localdomain (host-79-22-58-175.retail.telecomitalia.it\n\t[79.22.58.175]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id C4F39240004;\n\tSat, 13 Mar 2021 09:29:53 +0000 (UTC)"],"Date":"Sat, 13 Mar 2021 10:30:24 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210313093024.ncgpdm6qq5skg4ww@uno.localdomain>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15659,"web_url":"https://patchwork.libcamera.org/comment/15659/","msgid":"<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>","date":"2021-03-13T22:47:13","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Mar 12, 2021 at 05:47:22AM +0000, Kieran Bingham wrote:\n> Buffers queued to a pipeline handler may not be yet queued to a device\n> when the request is cancelled.\n> \n> This can lead to the FrameMetadata having never been explicitly set by\n> an underlying V4L2 device.\n> \n> The status field on this is used to check the state of the buffer to\n> determine if it was correctly filled, or if it was cancelled.\n> \n> In the event that the buffer is not used, it must be marked as Error as\n> the metadata associated with that frame will not be valid.\n\nShouldn't it be Cancelled then ?\n\n * \\var FrameMetadata::FrameError\n * An error occurred during capture of the frame. The frame data may be partly\n * or fully invalid. The sequence and timestamp fields of the FrameMetadata\n * structure is valid, the other fields may be invalid.\n * \\var FrameMetadata::FrameCancelled\n * Capture stopped before the frame completed. The frame data is not valid. All\n * fields of the FrameMetadata structure but the status field are invalid.\n\n> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n> Furthermore, swap the Enum values of the Status such that the first\n> state represents the initial Error state.\n\nNow that the status is initialized by default, is this needed ? I'm not\nopposed to the change, just trying to see if it has any functional\nimpact.\n\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/buffer.h | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index 302fe3d3e86b..3f5d0f1b6363 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -19,8 +19,8 @@ class Request;\n>  \n>  struct FrameMetadata {\n>  \tenum Status {\n> -\t\tFrameSuccess,\n>  \t\tFrameError,\n> +\t\tFrameSuccess,\n>  \t\tFrameCancelled,\n>  \t};\n>  \n> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>  \t\tunsigned int bytesused;\n>  \t};\n>  \n> -\tStatus status;\n> +\tStatus status = FrameError;\n\nThis will achieve the stated goal when a buffer is first allocated and\nqueued. After the buffer completes, its status will be FrameSuccess\n(assuming capture completed successfully). When the buffer is then\nrequeued as part of a new request, it will reach the pipeline handler\nwith state set to FrameSuccess. Wouldn't it be better to set the state\nexplicitly in Camera::queueRequest() instead ?\n\nGiven that the pipeline handlers are supposed to set the buffer state\nbefore completing it, I wonder if this change could hide other pipeline\nhandler issues. Another option would be to add a fourth state\n(FramePending for instance, to mimic RequestPending), set the buffer\nstate to FramePending in Camera::queueRequest(), and add an\nASSERT(status != FramePending) in PipelineHandler::completeBuffer().\nThat way we would catch incorrect pipeline handler behaviour right away.\n\n>  \tunsigned int sequence;\n>  \tuint64_t timestamp;\n>  \tstd::vector<Plane> planes;","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 101E3BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 13 Mar 2021 22:47:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 42B7F6084F;\n\tSat, 13 Mar 2021 23:47:50 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53AEE605B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 13 Mar 2021 23:47:49 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B086E3F0;\n\tSat, 13 Mar 2021 23:47:48 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cvyOP/gy\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615675668;\n\tbh=2oAs9+uW+fj3PFvRwG3Wi1y4xV/fbgLmwb5bX3WehU0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=cvyOP/gyWP/bdi/S7QRYgQMcTVPCzFfR1Cq507NqMuFY50JRNhabse+yT/epg8kFS\n\tQEJUgNCW2CmHiFtUoexbzo851ijr58HbTG1b8kmCkfYV0hI2NMTf5HJXlTup33ebYc\n\tBUqTGeaqnpuuMy+QoNNYPnoH/JsQgOI/2ZclF/tE=","Date":"Sun, 14 Mar 2021 00:47:13 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210312054727.852622-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15701,"web_url":"https://patchwork.libcamera.org/comment/15701/","msgid":"<621d3df3-0cb4-625b-b275-57ba92c093f4@ideasonboard.com>","date":"2021-03-15T12:40:08","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Niklas,\n\nOn 12/03/2021 23:23, Niklas Söderlund wrote:\n> Hi Kieran,\n> \n> On 2021-03-12 05:47:22 +0000, Kieran Bingham wrote:\n>> Buffers queued to a pipeline handler may not be yet queued to a device\n>> when the request is cancelled.\n>>\n>> This can lead to the FrameMetadata having never been explicitly set by\n>> an underlying V4L2 device.\n>>\n>> The status field on this is used to check the state of the buffer to\n>> determine if it was correctly filled, or if it was cancelled.\n>>\n>> In the event that the buffer is not used, it must be marked as Error as\n>> the metadata associated with that frame will not be valid.\n>>\n>> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n>> Furthermore, swap the Enum values of the Status such that the first\n>> state represents the initial Error state.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> I like this patch and I fear it could expose issues, have it been tested \n> with all supported pipelines? In either case I think it's the right \n> thing.\n> \n\nThis series has been tested on Raspberry Pi - but not Rockchip.\nI don't have an easy way to test that currently. Would you be able to\nrun this series on your test platform please?\n\n\n\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n>> ---\n>>  include/libcamera/buffer.h | 4 ++--\n>>  1 file changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n>> index 302fe3d3e86b..3f5d0f1b6363 100644\n>> --- a/include/libcamera/buffer.h\n>> +++ b/include/libcamera/buffer.h\n>> @@ -19,8 +19,8 @@ class Request;\n>>  \n>>  struct FrameMetadata {\n>>  \tenum Status {\n>> -\t\tFrameSuccess,\n>>  \t\tFrameError,\n>> +\t\tFrameSuccess,\n>>  \t\tFrameCancelled,\n>>  \t};\n>>  \n>> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>>  \t\tunsigned int bytesused;\n>>  \t};\n>>  \n>> -\tStatus status;\n>> +\tStatus status = FrameError;\n>>  \tunsigned int sequence;\n>>  \tuint64_t timestamp;\n>>  \tstd::vector<Plane> planes;\n>> -- \n>> 2.25.1\n>>\n>> _______________________________________________\n>> libcamera-devel mailing list\n>> libcamera-devel@lists.libcamera.org\n>> https://lists.libcamera.org/listinfo/libcamera-devel\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 5A0D8BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Mar 2021 12:40:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9FD5A68D41;\n\tMon, 15 Mar 2021 13:40:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 84CDA68D3E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Mar 2021 13:40:11 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ECC62556;\n\tMon, 15 Mar 2021 13:40:10 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Cjo5zHiZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615812011;\n\tbh=6mSuCiOBUaFdE31uGadeKoK/JDr4IQk7VaCX4cDM+pw=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=Cjo5zHiZMmbgM9f/pT2FaH974kXwegZdyDT8G1vo/TDSOIDm1sj+CwTbIOthxZzMw\n\tlqBGF+lI0c9WiajMLTXPqOem+5qqTZyeS/+vAHf+MDIRTf0a9I+KHzQzzfPEisPRz3\n\t6NVclIOQHYQg1+opoePqysUdz1RSB1x9E1kMOxh4=","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>\n\t<YEv32yTWMWsax/Nc@bismarck.dyn.berto.se>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBL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aj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<621d3df3-0cb4-625b-b275-57ba92c093f4@ideasonboard.com>","Date":"Mon, 15 Mar 2021 12:40:08 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YEv32yTWMWsax/Nc@bismarck.dyn.berto.se>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15702,"web_url":"https://patchwork.libcamera.org/comment/15702/","msgid":"<4cef301a-23c8-3488-18fa-642bd22bbc6d@ideasonboard.com>","date":"2021-03-15T12:47:26","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 13/03/2021 22:47, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Fri, Mar 12, 2021 at 05:47:22AM +0000, Kieran Bingham wrote:\n>> Buffers queued to a pipeline handler may not be yet queued to a device\n>> when the request is cancelled.\n>>\n>> This can lead to the FrameMetadata having never been explicitly set by\n>> an underlying V4L2 device.\n>>\n>> The status field on this is used to check the state of the buffer to\n>> determine if it was correctly filled, or if it was cancelled.\n>>\n>> In the event that the buffer is not used, it must be marked as Error as\n>> the metadata associated with that frame will not be valid.\n> \n> Shouldn't it be Cancelled then ?\n> \n>  * \\var FrameMetadata::FrameError\n>  * An error occurred during capture of the frame. The frame data may be partly\n>  * or fully invalid. The sequence and timestamp fields of the FrameMetadata\n>  * structure is valid, the other fields may be invalid.\n>  * \\var FrameMetadata::FrameCancelled\n>  * Capture stopped before the frame completed. The frame data is not valid. All\n>  * fields of the FrameMetadata structure but the status field are invalid.\n> \n>> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n>> Furthermore, swap the Enum values of the Status such that the first\n>> state represents the initial Error state.\n> \n> Now that the status is initialized by default, is this needed ? I'm not\n> opposed to the change, just trying to see if it has any functional\n> impact.\n\nMaybe not, but my aim was to ensure/convey that buffers which are\nfreshly allocated are not considered as Valid.\n\n\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  include/libcamera/buffer.h | 4 ++--\n>>  1 file changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n>> index 302fe3d3e86b..3f5d0f1b6363 100644\n>> --- a/include/libcamera/buffer.h\n>> +++ b/include/libcamera/buffer.h\n>> @@ -19,8 +19,8 @@ class Request;\n>>  \n>>  struct FrameMetadata {\n>>  \tenum Status {\n>> -\t\tFrameSuccess,\n>>  \t\tFrameError,\n>> +\t\tFrameSuccess,\n>>  \t\tFrameCancelled,\n>>  \t};\n>>  \n>> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>>  \t\tunsigned int bytesused;\n>>  \t};\n>>  \n>> -\tStatus status;\n>> +\tStatus status = FrameError;\n> \n> This will achieve the stated goal when a buffer is first allocated and\n> queued. After the buffer completes, its status will be FrameSuccess\n> (assuming capture completed successfully). When the buffer is then\n> requeued as part of a new request, it will reach the pipeline handler\n> with state set to FrameSuccess. Wouldn't it be better to set the state\n> explicitly in Camera::queueRequest() instead ?\n\nYes, I like the sound of that better. It ensures they always get set.\n(If it's never queued, well then we don't care about it).\n\n\n\n> Given that the pipeline handlers are supposed to set the buffer state\n> before completing it, I wonder if this change could hide other pipeline\n> handler issues. Another option would be to add a fourth state\n> (FramePending for instance, to mimic RequestPending), set the buffer\n> state to FramePending in Camera::queueRequest(), and add an\n> ASSERT(status != FramePending) in PipelineHandler::completeBuffer().\n> That way we would catch incorrect pipeline handler behaviour right away.\n\nInteresting, that might indeed be worthwhile.\n\nI was also contemplating extending the Request states too.\n\nWe use Pending from 'new' and 'queued into the pipeline handler'... I\nwonder if that should be:\n\nRequestNew (freshly allocated, owned by the application)\nRequestPending (queued into the PH)\nRequestComplete\nRequestCancelled\n\n\nSo there might be the same to apply to buffer states too.\n\n\n> \n>>  \tunsigned int sequence;\n>>  \tuint64_t timestamp;\n>>  \tstd::vector<Plane> planes;\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 36025BD80E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Mar 2021 12:47:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9184268D41;\n\tMon, 15 Mar 2021 13:47:31 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9639C68D3E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Mar 2021 13:47:29 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 134CA556;\n\tMon, 15 Mar 2021 13:47:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qCIxaN6T\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615812449;\n\tbh=01eTXUDchozPfSuEIPjo0rrpWeNDdyd+xTtwfVRe+1Y=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=qCIxaN6TgSfegPO0gZfWSu8EDymz69a2QNzis/+B31lfy7+e8FF8yTsI9xq25Jwhd\n\ts62bbsPVJub5vIgm7SXBzmFdCSZvVmQMz3VdvZHftQDAEiwNe8uqtUPOCcy4JvyiSl\n\tll6+Xr9L0IxO3pr1JxoW9YFnW4RBCdRE6u7ZkSsI=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>\n\t<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf\n\tKr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8\n\tRXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko\n\tlPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq\n\t8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36\n\tOe9X9dXB8YSNt7VjOcO7BTmFn/Z8r92mSAfHXpb07YJWJosQOQARAQABtDBLaWVyYW4gQmlu\n\tZ2hhbSA8a2llcmFuLmJpbmdoYW1AaWRlYXNvbmJvYXJkLmNvbT6JAlcEEwEKAEECGwMFCwkI\n\tBwIGFQgJCgsCBBYCAwECHgECF4ACGQEWIQSQLdeYP70o/eNy1HqhHkZyEKRh/QUCXWTtygUJ\n\tCyJXZAAKCRChHk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n4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<4cef301a-23c8-3488-18fa-642bd22bbc6d@ideasonboard.com>","Date":"Mon, 15 Mar 2021 12:47:26 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15711,"web_url":"https://patchwork.libcamera.org/comment/15711/","msgid":"<YE/sp/OqkEK0xBWI@pendragon.ideasonboard.com>","date":"2021-03-15T23:24:23","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Mon, Mar 15, 2021 at 12:47:26PM +0000, Kieran Bingham wrote:\n> On 13/03/2021 22:47, Laurent Pinchart wrote:\n> > On Fri, Mar 12, 2021 at 05:47:22AM +0000, Kieran Bingham wrote:\n> >> Buffers queued to a pipeline handler may not be yet queued to a device\n> >> when the request is cancelled.\n> >>\n> >> This can lead to the FrameMetadata having never been explicitly set by\n> >> an underlying V4L2 device.\n> >>\n> >> The status field on this is used to check the state of the buffer to\n> >> determine if it was correctly filled, or if it was cancelled.\n> >>\n> >> In the event that the buffer is not used, it must be marked as Error as\n> >> the metadata associated with that frame will not be valid.\n> > \n> > Shouldn't it be Cancelled then ?\n> > \n> >  * \\var FrameMetadata::FrameError\n> >  * An error occurred during capture of the frame. The frame data may be partly\n> >  * or fully invalid. The sequence and timestamp fields of the FrameMetadata\n> >  * structure is valid, the other fields may be invalid.\n> >  * \\var FrameMetadata::FrameCancelled\n> >  * Capture stopped before the frame completed. The frame data is not valid. All\n> >  * fields of the FrameMetadata structure but the status field are invalid.\n> > \n> >> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n> >> Furthermore, swap the Enum values of the Status such that the first\n> >> state represents the initial Error state.\n> > \n> > Now that the status is initialized by default, is this needed ? I'm not\n> > opposed to the change, just trying to see if it has any functional\n> > impact.\n> \n> Maybe not, but my aim was to ensure/convey that buffers which are\n> freshly allocated are not considered as Valid.\n\nSorry, I wasn't very precise, my question was related to swapping the\nenum values only.\n\n> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >> ---\n> >>  include/libcamera/buffer.h | 4 ++--\n> >>  1 file changed, 2 insertions(+), 2 deletions(-)\n> >>\n> >> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> >> index 302fe3d3e86b..3f5d0f1b6363 100644\n> >> --- a/include/libcamera/buffer.h\n> >> +++ b/include/libcamera/buffer.h\n> >> @@ -19,8 +19,8 @@ class Request;\n> >>  \n> >>  struct FrameMetadata {\n> >>  \tenum Status {\n> >> -\t\tFrameSuccess,\n> >>  \t\tFrameError,\n> >> +\t\tFrameSuccess,\n> >>  \t\tFrameCancelled,\n> >>  \t};\n> >>  \n> >> @@ -28,7 +28,7 @@ struct FrameMetadata {\n> >>  \t\tunsigned int bytesused;\n> >>  \t};\n> >>  \n> >> -\tStatus status;\n> >> +\tStatus status = FrameError;\n> > \n> > This will achieve the stated goal when a buffer is first allocated and\n> > queued. After the buffer completes, its status will be FrameSuccess\n> > (assuming capture completed successfully). When the buffer is then\n> > requeued as part of a new request, it will reach the pipeline handler\n> > with state set to FrameSuccess. Wouldn't it be better to set the state\n> > explicitly in Camera::queueRequest() instead ?\n> \n> Yes, I like the sound of that better. It ensures they always get set.\n> (If it's never queued, well then we don't care about it).\n> \n> > Given that the pipeline handlers are supposed to set the buffer state\n> > before completing it, I wonder if this change could hide other pipeline\n> > handler issues. Another option would be to add a fourth state\n> > (FramePending for instance, to mimic RequestPending), set the buffer\n> > state to FramePending in Camera::queueRequest(), and add an\n> > ASSERT(status != FramePending) in PipelineHandler::completeBuffer().\n> > That way we would catch incorrect pipeline handler behaviour right away.\n> \n> Interesting, that might indeed be worthwhile.\n> \n> I was also contemplating extending the Request states too.\n> \n> We use Pending from 'new' and 'queued into the pipeline handler'... I\n> wonder if that should be:\n> \n> RequestNew (freshly allocated, owned by the application)\n> RequestPending (queued into the PH)\n> RequestComplete\n> RequestCancelled\n> \n> So there might be the same to apply to buffer states too.\n\nWe could do that. I'm not sure if telling \"new\" and \"pending\" apart\nwould really be useful though, as the new state will never be seen by\nlibcamera (the request state will be set to pending by\nCamera::queueRequest()). It would thus be mostly be a debugging aid for\napplications. That doesn't make it worthless, but I haven't thought\nenough about common bug patterns on the application side to tell if this\nis what applications will need.\n\n> >>  \tunsigned int sequence;\n> >>  \tuint64_t timestamp;\n> >>  \tstd::vector<Plane> planes;","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 C7DB6BD80E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Mar 2021 23:25:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C08568D3F;\n\tTue, 16 Mar 2021 00:25:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20013602E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 00:25:00 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E63C3E7;\n\tTue, 16 Mar 2021 00:24:59 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"uPeEgHXu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615850699;\n\tbh=ktfpkeoiI+d50oSKxllhDEUTBs7IfDi2nKXzm/ENf8E=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=uPeEgHXugACit0TJCndkaNAwI7jLH63IL8ctKlph361Ya76B0+VXIHhN+d7TEWSmS\n\twQINRFtlUTV25Aeh+rDCMyyRkpkWmI+QTRu8hjZaMQeNnJohQI8giqnQLIOyhzqQKO\n\tC3dQCMlEpBvC15BY42o+fLvtlGD60joBUXtHxNDA=","Date":"Tue, 16 Mar 2021 01:24:23 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YE/sp/OqkEK0xBWI@pendragon.ideasonboard.com>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>\n\t<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>\n\t<4cef301a-23c8-3488-18fa-642bd22bbc6d@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<4cef301a-23c8-3488-18fa-642bd22bbc6d@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15719,"web_url":"https://patchwork.libcamera.org/comment/15719/","msgid":"<71b46ddb-b9be-9f98-5b3e-a48549351197@ideasonboard.com>","date":"2021-03-16T11:08:26","subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 15/03/2021 23:24, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> On Mon, Mar 15, 2021 at 12:47:26PM +0000, Kieran Bingham wrote:\n>> On 13/03/2021 22:47, Laurent Pinchart wrote:\n>>> On Fri, Mar 12, 2021 at 05:47:22AM +0000, Kieran Bingham wrote:\n>>>> Buffers queued to a pipeline handler may not be yet queued to a device\n>>>> when the request is cancelled.\n>>>>\n>>>> This can lead to the FrameMetadata having never been explicitly set by\n>>>> an underlying V4L2 device.\n>>>>\n>>>> The status field on this is used to check the state of the buffer to\n>>>> determine if it was correctly filled, or if it was cancelled.\n>>>>\n>>>> In the event that the buffer is not used, it must be marked as Error as\n>>>> the metadata associated with that frame will not be valid.\n>>>\n>>> Shouldn't it be Cancelled then ?\n>>>\n>>>  * \\var FrameMetadata::FrameError\n>>>  * An error occurred during capture of the frame. The frame data may be partly\n>>>  * or fully invalid. The sequence and timestamp fields of the FrameMetadata\n>>>  * structure is valid, the other fields may be invalid.\n>>>  * \\var FrameMetadata::FrameCancelled\n>>>  * Capture stopped before the frame completed. The frame data is not valid. All\n>>>  * fields of the FrameMetadata structure but the status field are invalid.\n>>>\n>>>> Initialise the FrameMetadata to FrameError to prevent uninitialised access.\n>>>> Furthermore, swap the Enum values of the Status such that the first\n>>>> state represents the initial Error state.\n>>>\n>>> Now that the status is initialized by default, is this needed ? I'm not\n>>> opposed to the change, just trying to see if it has any functional\n>>> impact.\n>>\n>> Maybe not, but my aim was to ensure/convey that buffers which are\n>> freshly allocated are not considered as Valid.\n> \n> Sorry, I wasn't very precise, my question was related to swapping the\n> enum values only.\n\n\nYes, I realised that. There is no expected functional change in swapping\nthe order *as long as* the FrameMetadata is always correctly initialised.\n\nMy statement above was referring to the fact that by ordering the states\nas FrameError first, it leads towards mirroring the expected states.\n\nI.e. Frames start in FrameError, and move to FrameSuccess or FrameCancelled.\n\nIf FrameSuccess is the first state, it implies that frames start\nsuccessfully, and move to either error or cancelled...\n\nThat's the reason for reordering the states.\n\nMaybe that is different if they should start in FrameCancelled. I'll\nthink about that more when I get back to reworking for v2.\n\n\n\n--\nKieran\n\n\n> \n>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>> ---\n>>>>  include/libcamera/buffer.h | 4 ++--\n>>>>  1 file changed, 2 insertions(+), 2 deletions(-)\n>>>>\n>>>> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n>>>> index 302fe3d3e86b..3f5d0f1b6363 100644\n>>>> --- a/include/libcamera/buffer.h\n>>>> +++ b/include/libcamera/buffer.h\n>>>> @@ -19,8 +19,8 @@ class Request;\n>>>>  \n>>>>  struct FrameMetadata {\n>>>>  \tenum Status {\n>>>> -\t\tFrameSuccess,\n>>>>  \t\tFrameError,\n>>>> +\t\tFrameSuccess,\n>>>>  \t\tFrameCancelled,\n>>>>  \t};\n>>>>  \n>>>> @@ -28,7 +28,7 @@ struct FrameMetadata {\n>>>>  \t\tunsigned int bytesused;\n>>>>  \t};\n>>>>  \n>>>> -\tStatus status;\n>>>> +\tStatus status = FrameError;\n>>>\n>>> This will achieve the stated goal when a buffer is first allocated and\n>>> queued. After the buffer completes, its status will be FrameSuccess\n>>> (assuming capture completed successfully). When the buffer is then\n>>> requeued as part of a new request, it will reach the pipeline handler\n>>> with state set to FrameSuccess. Wouldn't it be better to set the state\n>>> explicitly in Camera::queueRequest() instead ?\n>>\n>> Yes, I like the sound of that better. It ensures they always get set.\n>> (If it's never queued, well then we don't care about it).\n>>\n>>> Given that the pipeline handlers are supposed to set the buffer state\n>>> before completing it, I wonder if this change could hide other pipeline\n>>> handler issues. Another option would be to add a fourth state\n>>> (FramePending for instance, to mimic RequestPending), set the buffer\n>>> state to FramePending in Camera::queueRequest(), and add an\n>>> ASSERT(status != FramePending) in PipelineHandler::completeBuffer().\n>>> That way we would catch incorrect pipeline handler behaviour right away.\n>>\n>> Interesting, that might indeed be worthwhile.\n>>\n>> I was also contemplating extending the Request states too.\n>>\n>> We use Pending from 'new' and 'queued into the pipeline handler'... I\n>> wonder if that should be:\n>>\n>> RequestNew (freshly allocated, owned by the application)\n>> RequestPending (queued into the PH)\n>> RequestComplete\n>> RequestCancelled\n>>\n>> So there might be the same to apply to buffer states too.\n> \n> We could do that. I'm not sure if telling \"new\" and \"pending\" apart\n> would really be useful though, as the new state will never be seen by\n> libcamera (the request state will be set to pending by\n> Camera::queueRequest()). It would thus be mostly be a debugging aid for\n> applications. That doesn't make it worthless, but I haven't thought\n> enough about common bug patterns on the application side to tell if this\n> is what applications will need.\n\n\n>>>>  \tunsigned int sequence;\n>>>>  \tuint64_t timestamp;\n>>>>  \tstd::vector<Plane> planes;\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 75B16BD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 Mar 2021 11:08:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E7DCF68D48;\n\tTue, 16 Mar 2021 12:08:30 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0834C6084F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Mar 2021 12:08:30 +0100 (CET)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 77D3D8CF;\n\tTue, 16 Mar 2021 12:08:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"H1iTOGTR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1615892909;\n\tbh=J32LqmG6uiWbVyWrLjo89j80wKIJb4ILQt953REuWaw=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=H1iTOGTREVJQbAafPkHoQaTcz6UvXsWVtHzH3extz47Fn2G4Eb734JnjBv7OYyIPX\n\tDY2QsvtFo5Bffmo6bELkaIZ0XgLTJFt05H9q0dImfs4NMdlegeHagNAf0wjfl0hUij\n\tcg9kyyVMwpFdnudaZaJoI27LbRM0dVVSWNDMM9ps=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210312054727.852622-1-kieran.bingham@ideasonboard.com>\n\t<20210312054727.852622-4-kieran.bingham@ideasonboard.com>\n\t<YE1A8YXvz3VJ4OjA@pendragon.ideasonboard.com>\n\t<4cef301a-23c8-3488-18fa-642bd22bbc6d@ideasonboard.com>\n\t<YE/sp/OqkEK0xBWI@pendragon.ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Autocrypt":"addr=kieran.bingham@ideasonboard.com; keydata=\n\tmQINBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat\n\tV/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC\n\trRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C\n\tpotzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ\n\tcSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeH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D\n\tMJggbwjIotypzIXfhHNCeTkG7+qCDlSaBPclcPGYrTwCt0YWPU2TgGgJrVhYT20ierN8LUvj\n\t6qOPTd+Uk7NFzL65qkh80ZKNBFddx1AabQpSVQKbdcLb8OFs85kuSvFdgqZwgxA1vl4TFhNz\n\tPZ79NAmXLackAx3sOVFhk4WQaKRshCB7cSl+RIng5S/ThOBlwNlcKG7j7W2MC06BlTbdEkUp\n\tECzuuRBv8wX4OQl+hbWbB/VKIx5HKlLu1eypen/5lNVzSqMMIYkkZcjV2SWQyUGxSwq0O/sx\n\tS0A8/atCHUXOboUsn54qdxrVDaK+6jIAuo8JiRWctP16KjzUM7MO0/+4zllM8EY57rXrj48j\n\tsbEYX0YQnzaj+jO6kJtoZsIaYR7rMMq9aUAjyiaEZpmP1qF/2sYenDx0Fg2BSlLvLvXM0vU8\n\tpQk3kgDu7kb/7PRYrZvBsr21EIQoIjXbZxDz/o7z95frkP71EaICttZ6k9q5oxxA5WC6sTXc\n\tMW8zs8avFNuA9VpXt0YupJd2ijtZy2mpZNG02fFVXhIn4G807G7+9mhuC4XG5rKlBBUXTvPU\n\tAfYnB4JBDLmLzBFavQfvonSfbitgXwCG3vS+9HEwAjU30Bar1PEOmIbiAoMzuKeRm2LVpmq4\n\tWZw01QYHU/GUV/zHJSFk","Organization":"Ideas on Board","Message-ID":"<71b46ddb-b9be-9f98-5b3e-a48549351197@ideasonboard.com>","Date":"Tue, 16 Mar 2021 11:08:26 +0000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101\n\tThunderbird/68.10.0","MIME-Version":"1.0","In-Reply-To":"<YE/sp/OqkEK0xBWI@pendragon.ideasonboard.com>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH v2 3/8] libcamera: buffer: Initialise\n\tstatus","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>","Reply-To":"kieran.bingham@ideasonboard.com","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]