[{"id":854,"web_url":"https://patchwork.libcamera.org/comment/854/","msgid":"<20190222104138.GD3522@pendragon.ideasonboard.com>","date":"2019-02-22T10:41:38","subject":"Re: [libcamera-devel] [PATCH 1/4] libcamera: pipeline_handler:\n\textend documentation for configureStreams()","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nThank you for the patch.\n\nOn Thu, Feb 21, 2019 at 12:59:36AM +0100, Niklas Söderlund wrote:\n> Extend the documentation to explicitly state that the pipeline handler\n> implementations are responsible to validate the requested configuration\n\ns/to validate/for validating that/\n\n> can be exactly satisfied by the hardware.\n> \n> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> ---\n>  src/libcamera/pipeline_handler.cpp | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index 616838fed702fec7..991674b34286ab16 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -136,6 +136,15 @@ PipelineHandler::~PipelineHandler()\n>   * is the Camera class which will receive configuration to apply from the\n>   * application.\n>   *\n> + * Each pipeline handler implementation is responsible to validate that the\n\ns/to validate/for validating/\n\n> + * configuration requested in \\a config is exactly the same that is actually\n> + * programmed and accepted by the hardware itself. If the format programmed\n\nMaybe s/is exactly.*by the hardware itself/can be achieved exactly/ ?\nIt's not just the hardware, other components may be involved, and what\nmatters for applications is not how the configuration is achieved\nexactly, but that it is achieved exactly. Similarly I wouldn't mention\n\"format programmed\" for the same reason.\n\n> + * differers from the one requested the pipeline handler shall return the\n\ns/differers+differs/\n\n> + * error -EINVAL. If one streams configuration can't be satisfied by the\n> + * hardware the pipeline handler does not need to try and program any other\n> + * streams in \\a config and the whole operation shall be consider to have\n> + * failed.\n\nThe result could be\n\n * Each pipeline handler implementation is responsible for validating\n * that the configuration requested in \\a config can be achieved\n * exactly. Any difference in pixel format, frame size or any other\n * parameter shall result in the -EINVAL error being returned, and no\n * change in configuration being applied to the pipeline. If\n * configuration of a subset of the streams can't be satisfied, the\n * whole configuration is considered invalid.\n\n>   * \\return 0 on success or a negative error code on error.\n>   */\n>","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C2A0600FD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Feb 2019 11:41:43 +0100 (CET)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A7220255;\n\tFri, 22 Feb 2019 11:41:42 +0100 (CET)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1550832102;\n\tbh=pxeWqAdoal9eiiydP0icGv4UU1XP+T81KA5IzpsydOI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aIrenl4//oiJL/Z4YjVugaRjyomExAcVud45lKA1hbIP+26HSFFjg1J2QcjjfySjZ\n\tjyd2UPiWYK9g/zCFFggvrrwgNiY9272JeBWrtE60YLZJjM1CHF2+P7QIE8CjVnn26D\n\tY911MqfG9i05y++ec8IsSc2d+kEo1GGa1U6idcO8=","Date":"Fri, 22 Feb 2019 12:41:38 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190222104138.GD3522@pendragon.ideasonboard.com>","References":"<20190220235939.25147-1-niklas.soderlund@ragnatech.se>\n\t<20190220235939.25147-2-niklas.soderlund@ragnatech.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190220235939.25147-2-niklas.soderlund@ragnatech.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/4] libcamera: pipeline_handler:\n\textend documentation for configureStreams()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Fri, 22 Feb 2019 10:41:43 -0000"}},{"id":869,"web_url":"https://patchwork.libcamera.org/comment/869/","msgid":"<20190224172341.GC899@bigcity.dyn.berto.se>","date":"2019-02-24T17:23:41","subject":"Re: [libcamera-devel] [PATCH 1/4] libcamera: pipeline_handler:\n\textend documentation for configureStreams()","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your feedback, as always I'm very happy for comments on \ndocumentation patches as I hope they improve my skill in writing them.  \nSomething I really wish to gain more skill in.\n\nI have taken all your suggestions as is for v2, thanks!\n\nOn 2019-02-22 12:41:38 +0200, Laurent Pinchart wrote:\n> Hi Niklas,\n> \n> Thank you for the patch.\n> \n> On Thu, Feb 21, 2019 at 12:59:36AM +0100, Niklas Söderlund wrote:\n> > Extend the documentation to explicitly state that the pipeline handler\n> > implementations are responsible to validate the requested configuration\n> \n> s/to validate/for validating that/\n> \n> > can be exactly satisfied by the hardware.\n> > \n> > Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> > ---\n> >  src/libcamera/pipeline_handler.cpp | 9 +++++++++\n> >  1 file changed, 9 insertions(+)\n> > \n> > diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> > index 616838fed702fec7..991674b34286ab16 100644\n> > --- a/src/libcamera/pipeline_handler.cpp\n> > +++ b/src/libcamera/pipeline_handler.cpp\n> > @@ -136,6 +136,15 @@ PipelineHandler::~PipelineHandler()\n> >   * is the Camera class which will receive configuration to apply from the\n> >   * application.\n> >   *\n> > + * Each pipeline handler implementation is responsible to validate that the\n> \n> s/to validate/for validating/\n> \n> > + * configuration requested in \\a config is exactly the same that is actually\n> > + * programmed and accepted by the hardware itself. If the format programmed\n> \n> Maybe s/is exactly.*by the hardware itself/can be achieved exactly/ ?\n> It's not just the hardware, other components may be involved, and what\n> matters for applications is not how the configuration is achieved\n> exactly, but that it is achieved exactly. Similarly I wouldn't mention\n> \"format programmed\" for the same reason.\n> \n> > + * differers from the one requested the pipeline handler shall return the\n> \n> s/differers+differs/\n> \n> > + * error -EINVAL. If one streams configuration can't be satisfied by the\n> > + * hardware the pipeline handler does not need to try and program any other\n> > + * streams in \\a config and the whole operation shall be consider to have\n> > + * failed.\n> \n> The result could be\n> \n>  * Each pipeline handler implementation is responsible for validating\n>  * that the configuration requested in \\a config can be achieved\n>  * exactly. Any difference in pixel format, frame size or any other\n>  * parameter shall result in the -EINVAL error being returned, and no\n>  * change in configuration being applied to the pipeline. If\n>  * configuration of a subset of the streams can't be satisfied, the\n>  * whole configuration is considered invalid.\n> \n> >   * \\return 0 on success or a negative error code on error.\n> >   */\n> >  \n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x143.google.com (mail-lf1-x143.google.com\n\t[IPv6:2a00:1450:4864:20::143])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A3674601E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Feb 2019 18:23:43 +0100 (CET)","by mail-lf1-x143.google.com with SMTP id h10so5115196lfc.12\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Feb 2019 09:23:43 -0800 (PST)","from localhost (89-233-230-99.cust.bredband2.com. [89.233.230.99])\n\tby smtp.gmail.com with ESMTPSA id\n\tp135sm2170517lfa.20.2019.02.24.09.23.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 24 Feb 2019 09:23:42 -0800 (PST)"],"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\t:user-agent; bh=muJduCxIdle8/ioRkltIk6AajjqYGCCv0iKjH56WuMY=;\n\tb=S+pMlOgRiLqyqOtF2nQybhcsDLQ4X3voFFwZDoGAWUOg/vrBpr3DxbQ63aXyIlwYFm\n\tbIfiojvtxm8Xm1K/8XPuS1fjvwDoGPcA5osfMFyX3Zzes/TNMi5KlylgugsCoSd/XKJA\n\tSO5NusxcJSz24yOcZQlUpxaXuqRzjE+5VtfCF1HaUz8I2H58NOSVbbHFhJGFjL0AtRB3\n\tfJ+4FGVqQxJlz3Tswgc4znOoi1NrnpZY9hYWK7ypVaHXI/AnhapIJFuqzBFOr1twD6L5\n\tgWSQfKQ2ONZY2OD2gWw9VSAPNSW6GpTv3Nn7mKxBdxrXDYmdpSyR19qgPaRC/7MgDYuR\n\tSwjQ==","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:user-agent;\n\tbh=muJduCxIdle8/ioRkltIk6AajjqYGCCv0iKjH56WuMY=;\n\tb=CVwjEliu6cXtRXfYxGBeKQJIQgCV/OtPHbLeBTQ6LqdNtUOZEmLVtXlyezEaRO0NWb\n\tkh6i6INrnZgx+PKpMsyk5rZ+DBPV49+i9MTjjeulvQac1ud99NqrjCJfEqoMmH6lFxQj\n\t6UFsGfBARAWdNNOtvZmFVgVr0U/7693hvIm/gn70uCxBOYqZVpVlRFIAEci8RO1eDrOx\n\tpgb2QXqyGYHDvqjbGdlnFlGO0iE1bk4QBPcXl+jsr8w1jpSBwPKeLKZLvQripixcrJtP\n\tf4ibs2iwYEh6lvFSrf7v7T63djKwAjmCiHBcX61NFxGeaj83Ume6M8H2cclu18hf1JIj\n\tIeqQ==","X-Gm-Message-State":"AHQUAuYAue4oDRkfn+38BT65JhRhVSJa28eX8Q1wel1+OqjoxKGVd152\n\tDFgBpAwRZScmeOCcJD71mUF+WPEZgew=","X-Google-Smtp-Source":"AHgI3IayxyPWflPcbTWpg83rgbYA4Ch4dqhtKRqLu700sFdKa4beE9cY9INUNMDoYacF2NMMUYZq+w==","X-Received":"by 2002:a19:40c2:: with SMTP id\n\tn185mr1397788lfa.67.1551029022956; \n\tSun, 24 Feb 2019 09:23:42 -0800 (PST)","Date":"Sun, 24 Feb 2019 18:23:41 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20190224172341.GC899@bigcity.dyn.berto.se>","References":"<20190220235939.25147-1-niklas.soderlund@ragnatech.se>\n\t<20190220235939.25147-2-niklas.soderlund@ragnatech.se>\n\t<20190222104138.GD3522@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20190222104138.GD3522@pendragon.ideasonboard.com>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH 1/4] libcamera: pipeline_handler:\n\textend documentation for configureStreams()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","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>","X-List-Received-Date":"Sun, 24 Feb 2019 17:23:43 -0000"}}]