[{"id":2816,"web_url":"https://patchwork.libcamera.org/comment/2816/","msgid":"<20191007044553.GN4740@pendragon.ideasonboard.com>","date":"2019-10-07T04:45:53","subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Sun, Oct 06, 2019 at 10:08:51PM +0200, Jacopo Mondi wrote:\n> Add support to the dummy VIMC IPA for tracing operation by using a FIFO\n> channel that will be used by the IPA Interface test to verify\n> communications with the IPA.\n> \n> At the moment only add support for the init() operation as it's the only\n> defined one.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  include/ipa/ipa_vimc.h | 21 +++++++++++++\n>  src/ipa/ipa_vimc.cpp   | 68 +++++++++++++++++++++++++++++++++++++++++-\n>  2 files changed, 88 insertions(+), 1 deletion(-)\n>  create mode 100644 include/ipa/ipa_vimc.h\n> \n> diff --git a/include/ipa/ipa_vimc.h b/include/ipa/ipa_vimc.h\n> new file mode 100644\n> index 000000000000..f4a3ef4f32a4\n> --- /dev/null\n> +++ b/include/ipa/ipa_vimc.h\n> @@ -0,0 +1,21 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2019, Google Inc.\n> + *\n> + * ipa_vimc.h - Vimc Image Processing Algorithm module\n> + */\n> +\n> +#ifndef __LIBCAMERA_IPA_VIMC_H__\n> +#define __LIBCAMERA_IPA_VIMC_H__\n> +\n> +namespace libcamera {\n> +\n> +static const char *vimcFifoPath = \"/tmp/vimc_ipa_fifo\";\n\nThis should be a #define, otherwise every time this file is included you\nwill end up creating a symbol. You also need a blank line here.\n\nWith this fixed,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +enum IPAOperationCode {\n> +\tIPAOperationNone,\n> +\tIPAOperationInit,\n> +};\n> +\n> +}; /* namespace libcamera */\n> +\n> +#endif /* __LIBCAMERA_IPA_VIMC_H__ */\n> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> index abc06e7f5fd5..0bc0b73c2d3f 100644\n> --- a/src/ipa/ipa_vimc.cpp\n> +++ b/src/ipa/ipa_vimc.cpp\n> @@ -5,25 +5,91 @@\n>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>   */\n>  \n> +#include <ipa/ipa_vimc.h>\n> +\n> +#include <fcntl.h>\n> +#include <string.h>\n> +#include <sys/stat.h>\n> +#include <unistd.h>\n> +\n>  #include <iostream>\n>  \n>  #include <ipa/ipa_interface.h>\n>  #include <ipa/ipa_module_info.h>\n>  \n> +#include \"log.h\"\n> +\n>  namespace libcamera {\n>  \n> +LOG_DEFINE_CATEGORY(IPAVimc)\n> +\n>  class IPAVimc : public IPAInterface\n>  {\n>  public:\n> +\tIPAVimc();\n> +\t~IPAVimc();\n> +\n>  \tint init();\n> +\n> +private:\n> +\tvoid initTrace();\n> +\tvoid trace(enum IPAOperationCode operation);\n> +\n> +\tint fd_;\n>  };\n>  \n> +IPAVimc::IPAVimc()\n> +\t: fd_(-1)\n> +{\n> +\tinitTrace();\n> +}\n> +\n> +IPAVimc::~IPAVimc()\n> +{\n> +\tif (fd_)\n> +\t\t::close(fd_);\n> +}\n> +\n>  int IPAVimc::init()\n>  {\n> -\tstd::cout << \"initializing vimc IPA!\" << std::endl;\n> +\ttrace(IPAOperationInit);\n> +\n> +\tLOG(IPAVimc, Debug) << \"initializing vimc IPA!\";\n> +\n>  \treturn 0;\n>  }\n>  \n> +void IPAVimc::initTrace()\n> +{\n> +\tstruct stat fifoStat;\n> +\tint ret = stat(vimcFifoPath, &fifoStat);\n> +\tif (ret)\n> +\t\treturn;\n> +\n> +\tret = ::open(vimcFifoPath, O_WRONLY);\n> +\tif (ret < 0) {\n> +\t\tret = -errno;\n> +\t\tLOG(IPAVimc, Error) << \"Failed to open vimc IPA test FIFO: \"\n> +\t\t\t\t    << strerror(-ret);\n> +\t\treturn;\n> +\t}\n> +\n> +\tfd_ = ret;\n> +}\n> +\n> +void IPAVimc::trace(enum IPAOperationCode operation)\n> +{\n> +\tif (fd_ < 0)\n> +\t\treturn;\n> +\n> +\tint ret = ::write(fd_, &operation, sizeof(operation));\n> +\tif (ret < 0) {\n> +\t\tret = -errno;\n> +\t\tLOG(IPAVimc, Error) << \"Failed to write to vimc IPA test FIFO: \"\n> +\t\t\t\t    << strerror(-ret);\n> +\t}\n> +}\n> +\n>  /*\n>   * External IPA module interface\n>   */","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["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 4954360BC6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2019 06:45:56 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(modemcable151.96-160-184.mc.videotron.ca [184.160.96.151])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8BC3ADD;\n\tMon,  7 Oct 2019 06:45:55 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570423555;\n\tbh=gQrSedi4O0W880mFFbwnDodH+4h8Di/DUjHyGpbbbpI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=J1h7y7R4QZO8lGEg/57/j6zoZ3SACILAI7YbOn6mhy45HhVlIzg8tNPICdc9pR6wO\n\tgDZItZ9CLm68Wbz7DNBmA1Mbor6315NBWn/OvUK2gIUbHaI2wrxuD+UVu8qAFxxbhf\n\t+zPw7Bas/TSx7ttiRmUN6G8JvBdWlcCKihoJyvFA=","Date":"Mon, 7 Oct 2019 07:45:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191007044553.GN4740@pendragon.ideasonboard.com>","References":"<20191006200852.11775-1-jacopo@jmondi.org>\n\t<20191006200852.11775-5-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191006200852.11775-5-jacopo@jmondi.org>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","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":"Mon, 07 Oct 2019 04:45:56 -0000"}},{"id":2820,"web_url":"https://patchwork.libcamera.org/comment/2820/","msgid":"<20191007081542.xkr6b2dvcebtvsx2@uno.localdomain>","date":"2019-10-07T08:15:42","subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Mon, Oct 07, 2019 at 07:45:53AM +0300, Laurent Pinchart wrote:\n> Hi Jacopo,\n>\n> Thank you for the patch.\n>\n> On Sun, Oct 06, 2019 at 10:08:51PM +0200, Jacopo Mondi wrote:\n> > Add support to the dummy VIMC IPA for tracing operation by using a FIFO\n> > channel that will be used by the IPA Interface test to verify\n> > communications with the IPA.\n> >\n> > At the moment only add support for the init() operation as it's the only\n> > defined one.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  include/ipa/ipa_vimc.h | 21 +++++++++++++\n> >  src/ipa/ipa_vimc.cpp   | 68 +++++++++++++++++++++++++++++++++++++++++-\n> >  2 files changed, 88 insertions(+), 1 deletion(-)\n> >  create mode 100644 include/ipa/ipa_vimc.h\n> >\n> > diff --git a/include/ipa/ipa_vimc.h b/include/ipa/ipa_vimc.h\n> > new file mode 100644\n> > index 000000000000..f4a3ef4f32a4\n> > --- /dev/null\n> > +++ b/include/ipa/ipa_vimc.h\n> > @@ -0,0 +1,21 @@\n> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> > +/*\n> > + * Copyright (C) 2019, Google Inc.\n> > + *\n> > + * ipa_vimc.h - Vimc Image Processing Algorithm module\n> > + */\n> > +\n> > +#ifndef __LIBCAMERA_IPA_VIMC_H__\n> > +#define __LIBCAMERA_IPA_VIMC_H__\n> > +\n> > +namespace libcamera {\n> > +\n> > +static const char *vimcFifoPath = \"/tmp/vimc_ipa_fifo\";\n>\n> This should be a #define, otherwise every time this file is included you\n> will end up creating a symbol. You also need a blank line here.\n>\n\nCorrect, each compilation unit will have its own copy.\n\nAlthough, macros are heavily discouraged everywhere, and specifically I'm\nnot at ease in putting them in public headers, unless very well\nprefixed. I cannot find anywhere clearly defined if constexpr\nexpressions behaves any differently than regular variables in regards to\ntheir allocation, but being them variables I assume there's nothing\ndifferent, as a symbol has to be created for each file unit that\nincludes the header.\n\nI'll go with a macro, but I'm not happy with it, and I rather pay the\nprice of having the symbol reserved twice (which only happens when\nrunning tests though).\n\nThanks\n   j\n\n> With this fixed,\n>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>\n> > +enum IPAOperationCode {\n> > +\tIPAOperationNone,\n> > +\tIPAOperationInit,\n> > +};\n> > +\n> > +}; /* namespace libcamera */\n> > +\n> > +#endif /* __LIBCAMERA_IPA_VIMC_H__ */\n> > diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> > index abc06e7f5fd5..0bc0b73c2d3f 100644\n> > --- a/src/ipa/ipa_vimc.cpp\n> > +++ b/src/ipa/ipa_vimc.cpp\n> > @@ -5,25 +5,91 @@\n> >   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n> >   */\n> >\n> > +#include <ipa/ipa_vimc.h>\n> > +\n> > +#include <fcntl.h>\n> > +#include <string.h>\n> > +#include <sys/stat.h>\n> > +#include <unistd.h>\n> > +\n> >  #include <iostream>\n> >\n> >  #include <ipa/ipa_interface.h>\n> >  #include <ipa/ipa_module_info.h>\n> >\n> > +#include \"log.h\"\n> > +\n> >  namespace libcamera {\n> >\n> > +LOG_DEFINE_CATEGORY(IPAVimc)\n> > +\n> >  class IPAVimc : public IPAInterface\n> >  {\n> >  public:\n> > +\tIPAVimc();\n> > +\t~IPAVimc();\n> > +\n> >  \tint init();\n> > +\n> > +private:\n> > +\tvoid initTrace();\n> > +\tvoid trace(enum IPAOperationCode operation);\n> > +\n> > +\tint fd_;\n> >  };\n> >\n> > +IPAVimc::IPAVimc()\n> > +\t: fd_(-1)\n> > +{\n> > +\tinitTrace();\n> > +}\n> > +\n> > +IPAVimc::~IPAVimc()\n> > +{\n> > +\tif (fd_)\n> > +\t\t::close(fd_);\n> > +}\n> > +\n> >  int IPAVimc::init()\n> >  {\n> > -\tstd::cout << \"initializing vimc IPA!\" << std::endl;\n> > +\ttrace(IPAOperationInit);\n> > +\n> > +\tLOG(IPAVimc, Debug) << \"initializing vimc IPA!\";\n> > +\n> >  \treturn 0;\n> >  }\n> >\n> > +void IPAVimc::initTrace()\n> > +{\n> > +\tstruct stat fifoStat;\n> > +\tint ret = stat(vimcFifoPath, &fifoStat);\n> > +\tif (ret)\n> > +\t\treturn;\n> > +\n> > +\tret = ::open(vimcFifoPath, O_WRONLY);\n> > +\tif (ret < 0) {\n> > +\t\tret = -errno;\n> > +\t\tLOG(IPAVimc, Error) << \"Failed to open vimc IPA test FIFO: \"\n> > +\t\t\t\t    << strerror(-ret);\n> > +\t\treturn;\n> > +\t}\n> > +\n> > +\tfd_ = ret;\n> > +}\n> > +\n> > +void IPAVimc::trace(enum IPAOperationCode operation)\n> > +{\n> > +\tif (fd_ < 0)\n> > +\t\treturn;\n> > +\n> > +\tint ret = ::write(fd_, &operation, sizeof(operation));\n> > +\tif (ret < 0) {\n> > +\t\tret = -errno;\n> > +\t\tLOG(IPAVimc, Error) << \"Failed to write to vimc IPA test FIFO: \"\n> > +\t\t\t\t    << strerror(-ret);\n> > +\t}\n> > +}\n> > +\n> >  /*\n> >   * External IPA module interface\n> >   */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net\n\t[217.70.183.197])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C128961565\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2019 10:13:57 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5A1EA1C0019;\n\tMon,  7 Oct 2019 08:13:56 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Mon, 7 Oct 2019 10:15:42 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191007081542.xkr6b2dvcebtvsx2@uno.localdomain>","References":"<20191006200852.11775-1-jacopo@jmondi.org>\n\t<20191006200852.11775-5-jacopo@jmondi.org>\n\t<20191007044553.GN4740@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"nve2yva4yfzeuwxn\"","Content-Disposition":"inline","In-Reply-To":"<20191007044553.GN4740@pendragon.ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","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":"Mon, 07 Oct 2019 08:13:57 -0000"}},{"id":2821,"web_url":"https://patchwork.libcamera.org/comment/2821/","msgid":"<20191007171525.GB11781@pendragon.ideasonboard.com>","date":"2019-10-07T17:15:25","subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn Mon, Oct 07, 2019 at 10:15:42AM +0200, Jacopo Mondi wrote:\n> On Mon, Oct 07, 2019 at 07:45:53AM +0300, Laurent Pinchart wrote:\n> > On Sun, Oct 06, 2019 at 10:08:51PM +0200, Jacopo Mondi wrote:\n> >> Add support to the dummy VIMC IPA for tracing operation by using a FIFO\n> >> channel that will be used by the IPA Interface test to verify\n> >> communications with the IPA.\n> >>\n> >> At the moment only add support for the init() operation as it's the only\n> >> defined one.\n> >>\n> >> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> >> ---\n> >>  include/ipa/ipa_vimc.h | 21 +++++++++++++\n> >>  src/ipa/ipa_vimc.cpp   | 68 +++++++++++++++++++++++++++++++++++++++++-\n> >>  2 files changed, 88 insertions(+), 1 deletion(-)\n> >>  create mode 100644 include/ipa/ipa_vimc.h\n> >>\n> >> diff --git a/include/ipa/ipa_vimc.h b/include/ipa/ipa_vimc.h\n> >> new file mode 100644\n> >> index 000000000000..f4a3ef4f32a4\n> >> --- /dev/null\n> >> +++ b/include/ipa/ipa_vimc.h\n> >> @@ -0,0 +1,21 @@\n> >> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> >> +/*\n> >> + * Copyright (C) 2019, Google Inc.\n> >> + *\n> >> + * ipa_vimc.h - Vimc Image Processing Algorithm module\n> >> + */\n> >> +\n> >> +#ifndef __LIBCAMERA_IPA_VIMC_H__\n> >> +#define __LIBCAMERA_IPA_VIMC_H__\n> >> +\n> >> +namespace libcamera {\n> >> +\n> >> +static const char *vimcFifoPath = \"/tmp/vimc_ipa_fifo\";\n> >\n> > This should be a #define, otherwise every time this file is included you\n> > will end up creating a symbol. You also need a blank line here.\n> \n> Correct, each compilation unit will have its own copy.\n> \n> Although, macros are heavily discouraged everywhere, and specifically I'm\n> not at ease in putting them in public headers, unless very well\n> prefixed. I cannot find anywhere clearly defined if constexpr\n> expressions behaves any differently than regular variables in regards to\n> their allocation, but being them variables I assume there's nothing\n> different, as a symbol has to be created for each file unit that\n> includes the header.\n\nNote that you're declaring a const variable, not a constexpr variable. I\nwonder if that makes a difference when it comes to optimisation. Maybe\nthe compiler will always remove the symbol if it doesn't get used ? If\nthat's the case we could avoid a macro.\n\n> I'll go with a macro, but I'm not happy with it, and I rather pay the\n> price of having the symbol reserved twice (which only happens when\n> running tests though).\n> \n> > With this fixed,\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >\n> >> +enum IPAOperationCode {\n> >> +\tIPAOperationNone,\n> >> +\tIPAOperationInit,\n> >> +};\n> >> +\n> >> +}; /* namespace libcamera */\n> >> +\n> >> +#endif /* __LIBCAMERA_IPA_VIMC_H__ */\n> >> diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp\n> >> index abc06e7f5fd5..0bc0b73c2d3f 100644\n> >> --- a/src/ipa/ipa_vimc.cpp\n> >> +++ b/src/ipa/ipa_vimc.cpp\n> >> @@ -5,25 +5,91 @@\n> >>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n> >>   */\n> >>\n> >> +#include <ipa/ipa_vimc.h>\n> >> +\n> >> +#include <fcntl.h>\n> >> +#include <string.h>\n> >> +#include <sys/stat.h>\n> >> +#include <unistd.h>\n> >> +\n> >>  #include <iostream>\n> >>\n> >>  #include <ipa/ipa_interface.h>\n> >>  #include <ipa/ipa_module_info.h>\n> >>\n> >> +#include \"log.h\"\n> >> +\n> >>  namespace libcamera {\n> >>\n> >> +LOG_DEFINE_CATEGORY(IPAVimc)\n> >> +\n> >>  class IPAVimc : public IPAInterface\n> >>  {\n> >>  public:\n> >> +\tIPAVimc();\n> >> +\t~IPAVimc();\n> >> +\n> >>  \tint init();\n> >> +\n> >> +private:\n> >> +\tvoid initTrace();\n> >> +\tvoid trace(enum IPAOperationCode operation);\n> >> +\n> >> +\tint fd_;\n> >>  };\n> >>\n> >> +IPAVimc::IPAVimc()\n> >> +\t: fd_(-1)\n> >> +{\n> >> +\tinitTrace();\n> >> +}\n> >> +\n> >> +IPAVimc::~IPAVimc()\n> >> +{\n> >> +\tif (fd_)\n> >> +\t\t::close(fd_);\n> >> +}\n> >> +\n> >>  int IPAVimc::init()\n> >>  {\n> >> -\tstd::cout << \"initializing vimc IPA!\" << std::endl;\n> >> +\ttrace(IPAOperationInit);\n> >> +\n> >> +\tLOG(IPAVimc, Debug) << \"initializing vimc IPA!\";\n> >> +\n> >>  \treturn 0;\n> >>  }\n> >>\n> >> +void IPAVimc::initTrace()\n> >> +{\n> >> +\tstruct stat fifoStat;\n> >> +\tint ret = stat(vimcFifoPath, &fifoStat);\n> >> +\tif (ret)\n> >> +\t\treturn;\n> >> +\n> >> +\tret = ::open(vimcFifoPath, O_WRONLY);\n> >> +\tif (ret < 0) {\n> >> +\t\tret = -errno;\n> >> +\t\tLOG(IPAVimc, Error) << \"Failed to open vimc IPA test FIFO: \"\n> >> +\t\t\t\t    << strerror(-ret);\n> >> +\t\treturn;\n> >> +\t}\n> >> +\n> >> +\tfd_ = ret;\n> >> +}\n> >> +\n> >> +void IPAVimc::trace(enum IPAOperationCode operation)\n> >> +{\n> >> +\tif (fd_ < 0)\n> >> +\t\treturn;\n> >> +\n> >> +\tint ret = ::write(fd_, &operation, sizeof(operation));\n> >> +\tif (ret < 0) {\n> >> +\t\tret = -errno;\n> >> +\t\tLOG(IPAVimc, Error) << \"Failed to write to vimc IPA test FIFO: \"\n> >> +\t\t\t\t    << strerror(-ret);\n> >> +\t}\n> >> +}\n> >> +\n> >>  /*\n> >>   * External IPA module interface\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 0306360E1D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2019 19:15:28 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(modemcable118.64-20-96.mc.videotron.ca [96.20.64.118])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EBE84B2D;\n\tMon,  7 Oct 2019 19:15:27 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1570468528;\n\tbh=+0yCpVvNnkW350mVyMKX5ZQzHWsMsEnr76ksUd3fMJM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=uqlMWb/pZYf2U4Wk7KtNY9v+4YiAFtkFkpb5fWnQTYYEZgj4H4X9Ndh4aJ+J+uZyw\n\tYo75olGzMI7ftk2/QXwceAYlqonmSnju1RE7hNs2ruD93smISmmhSWe4OzoHtuUb8U\n\tla9R+JhTS9758expoHDLrcnM4OtuOn89yNgBpypk=","Date":"Mon, 7 Oct 2019 20:15:25 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191007171525.GB11781@pendragon.ideasonboard.com>","References":"<20191006200852.11775-1-jacopo@jmondi.org>\n\t<20191006200852.11775-5-jacopo@jmondi.org>\n\t<20191007044553.GN4740@pendragon.ideasonboard.com>\n\t<20191007081542.xkr6b2dvcebtvsx2@uno.localdomain>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20191007081542.xkr6b2dvcebtvsx2@uno.localdomain>","User-Agent":"Mutt/1.10.1 (2018-07-13)","Subject":"Re: [libcamera-devel] [PATCH v3 4/5] ipa: vimc: Add support for\n\ttracing operations","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":"Mon, 07 Oct 2019 17:15:29 -0000"}}]