[{"id":4348,"web_url":"https://patchwork.libcamera.org/comment/4348/","msgid":"<20200327200142.GA2161248@oden.dyn.berto.se>","date":"2020-03-27T20:01:42","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Fix\n\tcompilation on gcc 5 and 6","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 patch.\n\nOn 2020-03-27 21:34:24 +0200, Laurent Pinchart wrote:\n> Commit 5e7c5d64a67f (\"libcamera: ipu3: Do not unconditionally queue\n> buffers to CIO2\") introduced usage of the std::queue default constructor\n> by using copy-list-initialization from {}. The default constructor was\n> explicit in C++11, which was fixed retroactively with a defect report\n> (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html).\n> gcc 5 and 6 are unfortunately affected, requiring explicit usage of the\n> constructor.\n> \n> Fixes: 5e7c5d64a67f (\"libcamera: ipu3: Do not unconditionally queue buffers to CIO2\")\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index b490a801a9c4..1e114ca7ed10 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -1532,7 +1532,8 @@ int CIO2Device::allocateBuffers()\n>  \n>  void CIO2Device::freeBuffers()\n>  {\n> -\tavailableBuffers_ = {};\n> +\t/* The default std::queue constructor is explicit with gcc 5 and 6. */\n\nI'm not sure the comment is needed, no biggie. With or without it,\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> +\tavailableBuffers_ = std::queue<FrameBuffer *>{};\n>  \n>  \tbuffers_.clear();\n>  \n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 6A4F46040E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 21:01:44 +0100 (CET)","by mail-lf1-x143.google.com with SMTP id s1so8881531lfd.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 13:01:44 -0700 (PDT)","from localhost (h-200-138.A463.priv.bahnhof.se. [176.10.200.138])\n\tby smtp.gmail.com with ESMTPSA id\n\ts14sm3442619ljs.63.2020.03.27.13.01.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Mar 2020 13:01:43 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com header.b=\"QOj7YyCy\"; \n\tdkim-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=1ggeJD77r6fIL6PbrNo0DfEgBZFI24yLCUc5nxrCSWo=;\n\tb=QOj7YyCyd2hneEGEXQ6vUseqSUVd0F/h9iKsz64pMVy0jpeRAzN/Nny8OuRaoSxH4O\n\tX5I5sPsTKx7HOqGsb5/HmIPZT6JU0HTMN/o8hWIeISPZF+r0w6xwgQZ4yliBe4OZSUQ5\n\tS/u/IXbVK1FMJFaJfQEF5M3JPiOf+X5qwuVI4At7K+zsavfK+vik83fLTNWZZso2wMUL\n\tdJaM6av8md/OFP2vyk5R/0fGYzWC9Rol8IecJUfQA5FaDLXZV0/yLUIOuqBhlv10hHn4\n\t99DKP+67RZ+7Nnr89p3gEakDtqitYMn5jgz54+FlqxeveD21/mCK6XpTnb+fGKQwR1nP\n\tQRwQ==","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=1ggeJD77r6fIL6PbrNo0DfEgBZFI24yLCUc5nxrCSWo=;\n\tb=SYcN5H2ovZJZiFTzVpPqK5glqg0uGuJdDVNq+KauOPbk1ALnamujW5v61FaktGcbZD\n\tY4OUg7DTSAJUFARIDiLmKWQUmxLKklcuCUaBFFgiSZgZV/lTp0skmem1zaILh7zPBWKG\n\tvEm2pA3Jk1SVkudtJZeUpE1T6ExLfsbIllzRvF2+StqvPJG1Hlsivgkriu7zZxiadFia\n\tgItfa9fJR5XnJDa4FlduYwwhWIQcT4OWwk8CbfSJWX4nii34bkh5h2tDUWsxyVsgV1uW\n\twOZN64mFqOKTEJbrmlagbKnxdWJ3BB0FR7pv7HBoklJNIl0cp0AtgEDywYbjXphcsSkt\n\tauiQ==","X-Gm-Message-State":"AGi0PuYgLDIGIGVSDq9leIVUWGCVhMlAaWfEjTa6a2WtlyK5MYQV/jgu\n\tblmOvbbFK2VUBfld2WUW3hSk2g==","X-Google-Smtp-Source":"APiQypKQc9cBAKT2dWGnNLQyKIZRLexvnIKZhV9r2nHqEx47Vl8lHeNBVmKX/7jj0xvT1T758bsiUg==","X-Received":"by 2002:a19:ac42:: with SMTP id r2mr627369lfc.38.1585339303600; \n\tFri, 27 Mar 2020 13:01:43 -0700 (PDT)","Date":"Fri, 27 Mar 2020 21:01:42 +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":"<20200327200142.GA2161248@oden.dyn.berto.se>","References":"<20200327193424.13221-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200327193424.13221-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Fix\n\tcompilation on gcc 5 and 6","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>","X-List-Received-Date":"Fri, 27 Mar 2020 20:01:44 -0000"}},{"id":4349,"web_url":"https://patchwork.libcamera.org/comment/4349/","msgid":"<20200327201059.GR5040@pendragon.ideasonboard.com>","date":"2020-03-27T20:10:59","subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Fix\n\tcompilation on gcc 5 and 6","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Niklas,\n\nOn Fri, Mar 27, 2020 at 09:01:42PM +0100, Niklas Söderlund wrote:\n> On 2020-03-27 21:34:24 +0200, Laurent Pinchart wrote:\n> > Commit 5e7c5d64a67f (\"libcamera: ipu3: Do not unconditionally queue\n> > buffers to CIO2\") introduced usage of the std::queue default constructor\n> > by using copy-list-initialization from {}. The default constructor was\n> > explicit in C++11, which was fixed retroactively with a defect report\n> > (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html).\n> > gcc 5 and 6 are unfortunately affected, requiring explicit usage of the\n> > constructor.\n> > \n> > Fixes: 5e7c5d64a67f (\"libcamera: ipu3: Do not unconditionally queue buffers to CIO2\")\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-\n> >  1 file changed, 2 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > index b490a801a9c4..1e114ca7ed10 100644\n> > --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> > @@ -1532,7 +1532,8 @@ int CIO2Device::allocateBuffers()\n> >  \n> >  void CIO2Device::freeBuffers()\n> >  {\n> > -\tavailableBuffers_ = {};\n> > +\t/* The default std::queue constructor is explicit with gcc 5 and 6. */\n> \n> I'm not sure the comment is needed, no biggie. With or without it,\n\nIt's in the git log, but I've added it here to remind us that we could\nsimplify the code when we'll drop support for gcc 5 and 6 :-)\n\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n> \n> > +\tavailableBuffers_ = std::queue<FrameBuffer *>{};\n> >  \n> >  \tbuffers_.clear();\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 3CC4B6040E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Mar 2020 21:11:04 +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 9D3A42DC;\n\tFri, 27 Mar 2020 21:11:03 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"pAZWVJ9z\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1585339863;\n\tbh=2gdR5IVHsenVBG3viBO7qtNhh5zKu8RBlyu7btLQGpk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pAZWVJ9zznHNO+saZoplByQxsNVITK+LF7Sf/lN0xCxH2kbNhssPALMvhTsjR+T5N\n\tKg3d258FxouxxfTE/olSnKFBbvujGcSHFkDFIEMsnRj5BrlmqEcoBs5YSI5aK+bTCR\n\thAHJB0+ZF5aG5fUhmtluMubzx5j0259iGrJLeub4=","Date":"Fri, 27 Mar 2020 22:10:59 +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":"<20200327201059.GR5040@pendragon.ideasonboard.com>","References":"<20200327193424.13221-1-laurent.pinchart@ideasonboard.com>\n\t<20200327200142.GA2161248@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20200327200142.GA2161248@oden.dyn.berto.se>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Fix\n\tcompilation on gcc 5 and 6","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>","X-List-Received-Date":"Fri, 27 Mar 2020 20:11:04 -0000"}}]