[{"id":22328,"web_url":"https://patchwork.libcamera.org/comment/22328/","msgid":"<CAHW6GY+GF5n1Lh1-KP6mXLqYkFZwjR_EjpA=ExaBJKN7AG-E6w@mail.gmail.com>","date":"2022-03-21T11:01:45","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush, everyone\n\nOn Mon, 21 Mar 2022 at 10:27, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Hi,\n>\n> For version 3 of this series, I've removed the patch to add a timer that waits\n> for 5s after stop() to de-allocate buffers.  David and me have had a chat about\n> this and we think for now it is best that we have fully deterministic behavior for\n> buffer allocations, and avoid CMA fragmentation on the Raspberry Pi platforms.\n\nYes, I think I'm happier with the idea that bugs will be easier to\nreproduce if they don't depend on how fast people type stuff at the\nconsole!\n\nDavid\n\n> Apart from that, I have renamed the reallocate flag based on Kieran's suggestion.\n>\n> Regards,\n> Naush\n>\n> Naushir Patuck (5):\n>   pipeline: raspberrypi: Avoid over-allocation for ISP Output 1\n>   pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class\n>   pipeline: raspberrypi: Free buffers in the RPiCamera destructor and\n>     re-configure\n>   pipeline: raspberrypi: Repurpose RPi::Stream::reset()\n>   libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on\n>     streamOff()\n>\n>  include/libcamera/internal/v4l2_videodevice.h |  1 +\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 58 ++++++++++++-------\n>  .../pipeline/raspberrypi/rpi_stream.cpp       | 13 ++---\n>  .../pipeline/raspberrypi/rpi_stream.h         |  2 +-\n>  src/libcamera/v4l2_videodevice.cpp            | 16 +++++\n>  5 files changed, 61 insertions(+), 29 deletions(-)\n>\n> --\n> 2.25.1\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 7A110BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Mar 2022 11:01:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CE0BF604DC;\n\tMon, 21 Mar 2022 12:01:57 +0100 (CET)","from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7387B604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 12:01:56 +0100 (CET)","by mail-wr1-x436.google.com with SMTP id u16so19125306wru.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 04:01:56 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647860517;\n\tbh=BDkkwOczLhQZsw96VmnwXzlZxclHi+M62a10Sq1OCdY=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=wwdvh9DOR3vivwjY4BT0nVfKEDOWPBcoslRkXImJ2zkFRzqqJ/fIzUkGjgh0Fkb5u\n\tQEz1jgqM2paZlTb0YnK1lYLHtx8ODxQNlSjWV/JnplP1bl2QVSwR5cUMrRScxPkiBa\n\t41p+AUsSUPjwkhnf+hvWhHK1Qu/F2a02es3v4n+h4P4CMlorGQad/SYXHk9w/ZTYDc\n\teXPA0DErkH/tK/jS7qjCiwG6nzPPlgfgxAID25gbx4PUFpqIxWFElfXVTPsdmEZblP\n\tIoEuD1mstGszmvJEsWttklTo7kbb5Sjm7l6/iTNUTzrmvrs11s6fhgWk9CQgrapf99\n\txzkWljLLRvZ4w==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=E6LpcteSF8YFUI8ZzZ3uqA3umOAFLGT6OY43/5xGgcQ=;\n\tb=cqb5A0zaasFfO2ffujp2Cq/rFqxJ81Jx1yTtymcJXUwhO/dACxgHNYQKIH0Dd8kMZK\n\tsucCjSWSazu1zc4trZxVjpj9rwyMC0NgobLKIhELGThxSmwabFAeZ52Vmr1SEycRXJVQ\n\toHRadF5KzS7uv4wZcuIMjjvbQLMj6JY2her/4jOjCUngzB3h5DDew0P0eZ4nyhAvGSeO\n\tspxOuZ67obISCrVTNdLuBfC8x6Y2M6lTdKwBupUFCU8xuLYfyzNQmf6Z7XLd19MU7/2f\n\t/KH/7GaahiopWyimW++JPBIqig75aXR4xrxyqz0vj6Wx03Mn7lbqd1OlPK4szs32uGrG\n\tKJ/Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"cqb5A0za\"; dkim-atps=neutral","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=E6LpcteSF8YFUI8ZzZ3uqA3umOAFLGT6OY43/5xGgcQ=;\n\tb=Iq95ytvsrFteoTAL0iZ+1t3nFKBfVUVHEKAHtll1LbP8R19AxW8zxRIQ3JGafaW2/W\n\t1Xryphh/QuiU+iyF4jt23yvH5QIifwF3KBePDX6SAjAIVn9xCPNIrEvrb23O+01m3p76\n\th4KK4SraUk41Kg6yG+DYA1odJKrBzKPOfvtuwR1WvqrwxtO+LzO2Mg5t0oP+ihQXgSlR\n\tF/W7bLk1NrAISQS2CmwoK4MILVuWlxVMkP+T5UKa7mKM0XI4AKgD/2F7frcU2sXzrjYg\n\tu/93t4qVn3qGNXgW7HOrb/xNMXgsq3qE1vZXCVhMrtJ7jvi7I6tTUwLrgJ7waISBPa4F\n\tombQ==","X-Gm-Message-State":"AOAM532WKqwZG5GY1+dF/AoFsEXq0aga+DaaRNLlaUdwKa0N6/2+2di/\n\t67ikobGZypETZuTR2FRr6igoqnBFH5QH+qT/bGAy7w==","X-Google-Smtp-Source":"ABdhPJwYErjb5OUtq3G9yGGCnJr7uai6rY9P38rjQ80zevoJ+qQMDIXSVLdIsG4gXT9dywiAmRSfTQF5NAf75gj3G7c=","X-Received":"by 2002:adf:fd8b:0:b0:1f0:2347:e618 with SMTP id\n\td11-20020adffd8b000000b001f02347e618mr17444780wrr.334.1647860516053;\n\tMon, 21 Mar 2022 04:01:56 -0700 (PDT)","MIME-Version":"1.0","References":"<20220321102702.1753800-1-naush@raspberrypi.com>","In-Reply-To":"<20220321102702.1753800-1-naush@raspberrypi.com>","Date":"Mon, 21 Mar 2022 11:01:45 +0000","Message-ID":"<CAHW6GY+GF5n1Lh1-KP6mXLqYkFZwjR_EjpA=ExaBJKN7AG-E6w@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","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>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","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>"}},{"id":22334,"web_url":"https://patchwork.libcamera.org/comment/22334/","msgid":"<Yjh3QCcUo6ThNSYI@pendragon.ideasonboard.com>","date":"2022-03-21T13:01:52","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Mar 21, 2022 at 10:26:57AM +0000, Naushir Patuck via libcamera-devel wrote:\n> Hi,\n> \n> For version 3 of this series, I've removed the patch to add a timer that waits\n> for 5s after stop() to de-allocate buffers.  David and me have had a chat about\n> this and we think for now it is best that we have fully deterministic behavior for\n> buffer allocations, and avoid CMA fragmentation on the Raspberry Pi platforms.\n\nFor what it's worth, I agree about the deterministic behaviour. We can\nwork on top of this series to add a hint to the stop() function to tell\nthe pipeline handler if streaming is expected to be restarted soon.\n\n> Apart from that, I have renamed the reallocate flag based on Kieran's suggestion.\n> \n> Regards,\n> Naush\n> \n> Naushir Patuck (5):\n>   pipeline: raspberrypi: Avoid over-allocation for ISP Output 1\n>   pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class\n>   pipeline: raspberrypi: Free buffers in the RPiCamera destructor and\n>     re-configure\n>   pipeline: raspberrypi: Repurpose RPi::Stream::reset()\n>   libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on\n>     streamOff()\n> \n>  include/libcamera/internal/v4l2_videodevice.h |  1 +\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 58 ++++++++++++-------\n>  .../pipeline/raspberrypi/rpi_stream.cpp       | 13 ++---\n>  .../pipeline/raspberrypi/rpi_stream.h         |  2 +-\n>  src/libcamera/v4l2_videodevice.cpp            | 16 +++++\n>  5 files changed, 61 insertions(+), 29 deletions(-)","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 A671BBD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Mar 2022 13:02:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5E01E604D4;\n\tMon, 21 Mar 2022 14:02:11 +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 C2335604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 14:02:09 +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 63ECF291;\n\tMon, 21 Mar 2022 14:02:09 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647867731;\n\tbh=Pn8XkppEDS32XxV6fk/CzG79t86+31007cZ4Slvnj+k=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=HI3IBZdmsjkfNutsUSxZRyeTq1QO6XSiz6fNf6bbhSMjWG7qd2AtwMi81wbkaCYQX\n\tRRThmOGZMou6wssLk1fFlyQTfWbb4ZBgCr1V+sbEEPYRoJ9eNmYUxySdE92U12t+OF\n\tAcfPIJunA+2iQJEA/8bx3CVuQ4EPBU2gSZbx6wbxUdsuIOy66l0hzrxdBPyD3kkvPz\n\tED7yBX/gP4nFgBtte3LcUT0okUOCXw/PTO/gJDucC7wt2QygM4bYdptjIq83wUG6yl\n\tl95Os5zJjJsZ5191btq07iNKabSbfPrhk/G6MSxdOKYM0t3PbG0zSieb2EaUjcpqEk\n\tarVpkvVQAHIMw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647867729;\n\tbh=Pn8XkppEDS32XxV6fk/CzG79t86+31007cZ4Slvnj+k=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mAowgf9iRlDRgPF8EVIkMQxCrhiyRxyi3zpLgNtZoqrdb4QESFSzxn1rIRo0P4AZa\n\tMcbGPWfmk4pvjOMY30VNZEgmobp44uuL8g4YHzUcjnTCwxx6jrbMkb3pXNUfN/EfSL\n\tWv4BWpSPmbddHjBc0GqjlcZ4SegYWoA7l2B9+SY8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"mAowgf9i\"; dkim-atps=neutral","Date":"Mon, 21 Mar 2022 15:01:52 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yjh3QCcUo6ThNSYI@pendragon.ideasonboard.com>","References":"<20220321102702.1753800-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220321102702.1753800-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22336,"web_url":"https://patchwork.libcamera.org/comment/22336/","msgid":"<CAEmqJPrhSG5W28D7gQjBk3+DzB+kvfYSVuGkM7AtZzh1x0PUjA@mail.gmail.com>","date":"2022-03-21T13:06:04","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Laurent,\n\nOn Mon, 21 Mar 2022 at 13:02, Laurent Pinchart <\nlaurent.pinchart@ideasonboard.com> wrote:\n\n> On Mon, Mar 21, 2022 at 10:26:57AM +0000, Naushir Patuck via\n> libcamera-devel wrote:\n> > Hi,\n> >\n> > For version 3 of this series, I've removed the patch to add a timer that\n> waits\n> > for 5s after stop() to de-allocate buffers.  David and me have had a\n> chat about\n> > this and we think for now it is best that we have fully deterministic\n> behavior for\n> > buffer allocations, and avoid CMA fragmentation on the Raspberry Pi\n> platforms.\n>\n> For what it's worth, I agree about the deterministic behaviour. We can\n> work on top of this series to add a hint to the stop() function to tell\n> the pipeline handler if streaming is expected to be restarted soon.\n>\n\nI had a think about this briefly over the weekend, and I wonder if it might\nbe better to\nhave a new API function freeResources() type call instead of a flag in\nstop()? This would\nallow the application to separate out the two actions if it so desires.\n\nNaush\n\n\n>\n> > Apart from that, I have renamed the reallocate flag based on Kieran's\n> suggestion.\n> >\n> > Regards,\n> > Naush\n> >\n> > Naushir Patuck (5):\n> >   pipeline: raspberrypi: Avoid over-allocation for ISP Output 1\n> >   pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class\n> >   pipeline: raspberrypi: Free buffers in the RPiCamera destructor and\n> >     re-configure\n> >   pipeline: raspberrypi: Repurpose RPi::Stream::reset()\n> >   libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on\n> >     streamOff()\n> >\n> >  include/libcamera/internal/v4l2_videodevice.h |  1 +\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 58 ++++++++++++-------\n> >  .../pipeline/raspberrypi/rpi_stream.cpp       | 13 ++---\n> >  .../pipeline/raspberrypi/rpi_stream.h         |  2 +-\n> >  src/libcamera/v4l2_videodevice.cpp            | 16 +++++\n> >  5 files changed, 61 insertions(+), 29 deletions(-)\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\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 0FCC8BDE17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Mar 2022 13:06:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 638DE604DC;\n\tMon, 21 Mar 2022 14:06:22 +0100 (CET)","from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com\n\t[IPv6:2a00:1450:4864:20::12a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54919604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 14:06:21 +0100 (CET)","by mail-lf1-x12a.google.com with SMTP id d5so5291439lfj.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 06:06:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647867982;\n\tbh=N1NGZmJ1sYjx1EOqr9pFotZCpSuV41nPDxbkxKAgBa4=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=l0STKzWldahqMbOIO1c+/iYOnTyDFTXeqyDS99BydsSh1xexlUZTED/UGKtnexo3+\n\tx3U1M3KM1OfvU2YTDsXvvhCrLiPvioVGwwmNOgwKKbUrzEG63NtSV/cMZ57K1E/QYi\n\tWHYntELrcJ+NtGtt+v0dzPePEh21HKz25kOuj8Zfo0CQTf0DI6MKQ/ofcOwwW/OIH2\n\tR4SCxKL8Ta/ro6fp4fnC2hpzk4iwDF6W8/6U9wrDsUMkPaOwzH4cglEIen12dn1gmI\n\tujgCTKH7TYJWrVfpzM6ycxrlkFWHSUZ4+zngjPbBnDERuDqKyeOOF02bxcTETS7rA6\n\t/jkRvs8+2cecg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=PEPiNeFA9OmTR18FE+zwa8Av0yHaMK0Y97gzvWnQnvk=;\n\tb=JlQpAEFt8f00aEjN1ItVjEiMZOmkK9ysUY4vkkrAxLjEKQDzjbRAa2mr3jQjqHoH68\n\t4N6PgvBtsBsvocmlubDMbitMGcgiYR97eLxtisNU3VM9ibJTeDJLeN1xfIfmbKIoGMBC\n\tqq/iysQghIdPRmqukqBhVejmxX4NqGGUI8G/DheWXOR7DbkGB338FPp5ZstrFlFo9O3W\n\tGbVPEWwf8ozWmsbruG3PW8xPb7FJCNPmUFXxeOSjTqJpmFknVM7kR0P2/FrlFfJG1DWu\n\tS0Itwg9ZZQjo4zPXIcmhlwY7U2AODXy62rs2y0wi3rhr1JEP1nwC9r7kjm0t5OeI/pFm\n\tEyvg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"JlQpAEFt\"; dkim-atps=neutral","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=PEPiNeFA9OmTR18FE+zwa8Av0yHaMK0Y97gzvWnQnvk=;\n\tb=uy6XPe7iV1Nqdpr7fsD+f9wV0AcyKaQWy+cDPV3rn0aGLHbLH06cnqu5NNBRd3A4Ya\n\tWBOsv8hle0xO2wwmpF26b/UYIUJTzLvc4QKr1o0mRviGvEkBkFMUYNq+W9fwiJaBqo/y\n\tKaw0ze8yyZtQuUurwrmF3qGx5ajqkofb8IlRvLBLpOezCkB/MA07Pc6Q2XerckmMcBG7\n\tSKSimaMBii9qgvsXwzukI0WfT82uiRshxPYd6zLKf1xkzBD2/kC0uuyAdnSgqSz7DyHa\n\tvCJERE1WStyWrH5T+JDb05giapqrO/mfgJP0wSclb/DSKn85IdpSxgZarUi0es76EpMT\n\tFpfA==","X-Gm-Message-State":"AOAM5319Tq64P1Y52OiVAHjeIcAsRZ/WoAYr5AQQRSX/x6GNvjn0SO5N\n\tFOY+pDbFheNRGtCGsd+hB7jEaRTF4Pfd+Bhn5Z51+isSISo=","X-Google-Smtp-Source":"ABdhPJx4EYBaflba8DFVXaPefVsfrcFtEav1UXkzJE0VFpSahsrdbB23VIKET5exVvBuiGL0udPb8BBi4eaigT82/0Q=","X-Received":"by 2002:a05:6512:230c:b0:44a:2282:8e38 with SMTP id\n\to12-20020a056512230c00b0044a22828e38mr6307613lfu.315.1647867980606;\n\tMon, 21 Mar 2022 06:06:20 -0700 (PDT)","MIME-Version":"1.0","References":"<20220321102702.1753800-1-naush@raspberrypi.com>\n\t<Yjh3QCcUo6ThNSYI@pendragon.ideasonboard.com>","In-Reply-To":"<Yjh3QCcUo6ThNSYI@pendragon.ideasonboard.com>","Date":"Mon, 21 Mar 2022 13:06:04 +0000","Message-ID":"<CAEmqJPrhSG5W28D7gQjBk3+DzB+kvfYSVuGkM7AtZzh1x0PUjA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"0000000000009f0d6b05daba2902\"","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","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>"}},{"id":22338,"web_url":"https://patchwork.libcamera.org/comment/22338/","msgid":"<Yjh5tOMEdRHjyeRH@pendragon.ideasonboard.com>","date":"2022-03-21T13:12:20","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Mar 21, 2022 at 01:06:04PM +0000, Naushir Patuck wrote:\n> On Mon, 21 Mar 2022 at 13:02, Laurent Pinchart wrote:\n> > On Mon, Mar 21, 2022 at 10:26:57AM +0000, Naushir Patuck via\n> > libcamera-devel wrote:\n> > > Hi,\n> > >\n> > > For version 3 of this series, I've removed the patch to add a timer that waits\n> > > for 5s after stop() to de-allocate buffers.  David and me have had a chat about\n> > > this and we think for now it is best that we have fully deterministic behavior for\n> > > buffer allocations, and avoid CMA fragmentation on the Raspberry Pi platforms.\n> >\n> > For what it's worth, I agree about the deterministic behaviour. We can\n> > work on top of this series to add a hint to the stop() function to tell\n> > the pipeline handler if streaming is expected to be restarted soon.\n> \n> I had a think about this briefly over the weekend, and I wonder if it might be better to\n> have a new API function freeResources() type call instead of a flag in stop()? This would\n> allow the application to separate out the two actions if it so desires.\n\nPossibly. I think we need to consider what other actions a pipeline\nhandler may take as a result of application hints (in the form of flags,\nor as a separate API call). If an application plans to restart the\ncamera soon, various optimizations are possibly, such as not cutting\npower to the devices. There could be more too, and not everything may\nfall under the banner of freeing resources.\n\n> > > Apart from that, I have renamed the reallocate flag based on Kieran's suggestion.\n> > >\n> > > Regards,\n> > > Naush\n> > >\n> > > Naushir Patuck (5):\n> > >   pipeline: raspberrypi: Avoid over-allocation for ISP Output 1\n> > >   pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class\n> > >   pipeline: raspberrypi: Free buffers in the RPiCamera destructor and\n> > >     re-configure\n> > >   pipeline: raspberrypi: Repurpose RPi::Stream::reset()\n> > >   libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on\n> > >     streamOff()\n> > >\n> > >  include/libcamera/internal/v4l2_videodevice.h |  1 +\n> > >  .../pipeline/raspberrypi/raspberrypi.cpp      | 58 ++++++++++++-------\n> > >  .../pipeline/raspberrypi/rpi_stream.cpp       | 13 ++---\n> > >  .../pipeline/raspberrypi/rpi_stream.h         |  2 +-\n> > >  src/libcamera/v4l2_videodevice.cpp            | 16 +++++\n> > >  5 files changed, 61 insertions(+), 29 deletions(-)","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 A7996BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Mar 2022 13:12:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0EC53604C6;\n\tMon, 21 Mar 2022 14:12:39 +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 29B2C604C6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Mar 2022 14:12:38 +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 9726A291;\n\tMon, 21 Mar 2022 14:12:37 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1647868359;\n\tbh=MZQLQhk7eU3O7BfRp4Wkyp5lprukvZwaGpFq/kZaOKg=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=c3dKNpETPE9dsowbxdZ5Nlihj2eDo+eKuRjJ/jR1iYlOn9bEsRLGPe2Ap1m8PlLof\n\tCaoxmtfC81f7rL6dKYQvD/02RH8X75DCVsozEZ0TicJeRr5D+CHw6uBnSrSa+NuIEY\n\t0piyGSUW3LZly8GE014rDGS7ttZq9yvt4MGrKbuAzphMQIpF7QZrFFg+CaB0TdiRjk\n\taUKrYi+etZwtEdD0hBDC3wsykMZPShT5S6pThnM/NDNBl78cAj0BCmxsdf2I/k52mt\n\tBHi76F8R2CP0B/4/nIs3UakUXNGEWSMSO6zOr/nMdrLRa/bSbBIp/fU+NqFU2IEpq1\n\tl69A4GfnUINeQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1647868357;\n\tbh=MZQLQhk7eU3O7BfRp4Wkyp5lprukvZwaGpFq/kZaOKg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JuGdgSdpitU29rCzT4M1T/rccpXwiUrUUxCjkaOA7neGIFTwWNplLWOAHI/5mGHf8\n\tCZ1rndDMsDLNaiMebML9J/MENKvB9//+y4/Y8TLAm6eXdv2dEdVHaj/Y1sQE2LiyU4\n\ttsWIWBn0ZkNL2M2Ave2KZPaRVvAZTdw/lM+KQOMI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JuGdgSdp\"; dkim-atps=neutral","Date":"Mon, 21 Mar 2022 15:12:20 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<Yjh5tOMEdRHjyeRH@pendragon.ideasonboard.com>","References":"<20220321102702.1753800-1-naush@raspberrypi.com>\n\t<Yjh3QCcUo6ThNSYI@pendragon.ideasonboard.com>\n\t<CAEmqJPrhSG5W28D7gQjBk3+DzB+kvfYSVuGkM7AtZzh1x0PUjA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPrhSG5W28D7gQjBk3+DzB+kvfYSVuGkM7AtZzh1x0PUjA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Raspberry Pi: Efficient\n\tstart/stop/start sequences","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","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>"}}]