[{"id":15202,"web_url":"https://patchwork.libcamera.org/comment/15202/","msgid":"<20210217102449.GI17707@pyrite.rasen.tech>","date":"2021-02-17T10:24:49","subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Naush,\n\nOn Wed, Feb 17, 2021 at 10:08:51AM +0000, Naushir Patuck wrote:\n> Rename the IPA interface namespace to ipa::RPi for consistency with\n> the libcamera::RPi namespace label.\n> \n> There is no functional change in this commit.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  include/libcamera/ipa/raspberrypi.mojom       |  2 +-\n>  src/ipa/raspberrypi/raspberrypi.cpp           | 38 +++++++++---------\n>  .../pipeline/raspberrypi/raspberrypi.cpp      | 40 +++++++++----------\n>  .../pipeline/raspberrypi/rpi_stream.cpp       |  4 +-\n>  .../pipeline/raspberrypi/rpi_stream.h         |  4 +-\n>  5 files changed, 42 insertions(+), 46 deletions(-)\n> \n> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n> index 9c05cc68cceb..5a27b1e4fc2d 100644\n> --- a/include/libcamera/ipa/raspberrypi.mojom\n> +++ b/include/libcamera/ipa/raspberrypi.mojom\n> @@ -1,6 +1,6 @@\n>  /* SPDX-License-Identifier: LGPL-2.1-or-later */\n>  \n> -module ipa.rpi;\n> +module ipa.RPi;\n>  \n>  import \"include/libcamera/ipa/core.mojom\";\n>  \n> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n> index 974f4ec63058..1226ea514521 100644\n> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> @@ -63,7 +63,7 @@ constexpr double defaultMaxFrameDuration = 1e6 / 0.01;\n>  \n>  LOG_DEFINE_CATEGORY(IPARPI)\n>  \n> -class IPARPi : public ipa::rpi::IPARPiInterface\n> +class IPARPi : public ipa::RPi::IPARPiInterface\n>  {\n>  public:\n>  \tIPARPi()\n> @@ -76,24 +76,24 @@ public:\n>  \t~IPARPi()\n>  \t{\n>  \t\tif (lsTable_)\n> -\t\t\tmunmap(lsTable_, ipa::rpi::MaxLsGridSize);\n> +\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n>  \t}\n>  \n>  \tint init(const IPASettings &settings) override;\n> -\tvoid start(const ipa::rpi::StartControls &data,\n> -\t\t   ipa::rpi::StartControls *result) override;\n> +\tvoid start(const ipa::RPi::StartControls &data,\n> +\t\t   ipa::RPi::StartControls *result) override;\n>  \tvoid stop() override {}\n>  \n>  \tvoid configure(const CameraSensorInfo &sensorInfo,\n>  \t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n>  \t\t       const std::map<unsigned int, ControlInfoMap> &entityControls,\n> -\t\t       const ipa::rpi::ConfigInput &data,\n> -\t\t       ipa::rpi::ConfigOutput *response, int32_t *ret) override;\n> +\t\t       const ipa::RPi::ConfigInput &data,\n> +\t\t       ipa::RPi::ConfigOutput *response, int32_t *ret) override;\n>  \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n>  \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n>  \tvoid signalStatReady(const uint32_t bufferId) override;\n>  \tvoid signalQueueRequest(const ControlList &controls) override;\n> -\tvoid signalIspPrepare(const ipa::rpi::ISPConfig &data) override;\n> +\tvoid signalIspPrepare(const ipa::RPi::ISPConfig &data) override;\n>  \n>  private:\n>  \tvoid setMode(const CameraSensorInfo &sensorInfo);\n> @@ -168,8 +168,8 @@ int IPARPi::init(const IPASettings &settings)\n>  \treturn 0;\n>  }\n>  \n> -void IPARPi::start(const ipa::rpi::StartControls &data,\n> -\t\t   ipa::rpi::StartControls *result)\n> +void IPARPi::start(const ipa::RPi::StartControls &data,\n> +\t\t   ipa::RPi::StartControls *result)\n>  {\n>  \tRPiController::Metadata metadata;\n>  \n> @@ -291,8 +291,8 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)\n>  void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \t\t       [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n>  \t\t       const std::map<unsigned int, ControlInfoMap> &entityControls,\n> -\t\t       const ipa::rpi::ConfigInput &ipaConfig,\n> -\t\t       ipa::rpi::ConfigOutput *result, int32_t *ret)\n> +\t\t       const ipa::RPi::ConfigInput &ipaConfig,\n> +\t\t       ipa::RPi::ConfigOutput *result, int32_t *ret)\n>  {\n>  \tif (entityControls.size() != 2) {\n>  \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n> @@ -344,7 +344,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \t\thelper_->GetDelays(exposureDelay, gainDelay);\n>  \t\tsensorMetadata = helper_->SensorEmbeddedDataPresent();\n>  \n> -\t\tresult->params |= ipa::rpi::ConfigSensorParams;\n> +\t\tresult->params |= ipa::RPi::ConfigSensorParams;\n>  \t\tresult->sensorConfig.gainDelay = gainDelay;\n>  \t\tresult->sensorConfig.exposureDelay = exposureDelay;\n>  \t\tresult->sensorConfig.vblank = exposureDelay;\n> @@ -360,14 +360,14 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>  \tif (ipaConfig.lsTableHandle.isValid()) {\n>  \t\t/* Remove any previous table, if there was one. */\n>  \t\tif (lsTable_) {\n> -\t\t\tmunmap(lsTable_, ipa::rpi::MaxLsGridSize);\n> +\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n>  \t\t\tlsTable_ = nullptr;\n>  \t\t}\n>  \n>  \t\t/* Map the LS table buffer into user space. */\n>  \t\tlsTableHandle_ = std::move(ipaConfig.lsTableHandle);\n>  \t\tif (lsTableHandle_.isValid()) {\n> -\t\t\tlsTable_ = mmap(nullptr, ipa::rpi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n> +\t\t\tlsTable_ = mmap(nullptr, ipa::RPi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n>  \t\t\t\t\tMAP_SHARED, lsTableHandle_.fd(), 0);\n>  \n>  \t\t\tif (lsTable_ == MAP_FAILED) {\n> @@ -432,7 +432,7 @@ void IPARPi::signalStatReady(uint32_t bufferId)\n>  \n>  \treportMetadata();\n>  \n> -\tstatsMetadataComplete.emit(bufferId & ipa::rpi::MaskID, libcameraMetadata_);\n> +\tstatsMetadataComplete.emit(bufferId & ipa::RPi::MaskID, libcameraMetadata_);\n>  }\n>  \n>  void IPARPi::signalQueueRequest(const ControlList &controls)\n> @@ -440,7 +440,7 @@ void IPARPi::signalQueueRequest(const ControlList &controls)\n>  \tqueueRequest(controls);\n>  }\n>  \n> -void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)\n> +void IPARPi::signalIspPrepare(const ipa::RPi::ISPConfig &data)\n>  {\n>  \t/*\n>  \t * At start-up, or after a mode-switch, we may want to\n> @@ -451,7 +451,7 @@ void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)\n>  \tframeCount_++;\n>  \n>  \t/* Ready to push the input buffer into the ISP. */\n> -\trunIsp.emit(data.bayerBufferId & ipa::rpi::MaskID);\n> +\trunIsp.emit(data.bayerBufferId & ipa::RPi::MaskID);\n>  }\n>  \n>  void IPARPi::reportMetadata()\n> @@ -906,7 +906,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n>  \n>  void IPARPi::returnEmbeddedBuffer(unsigned int bufferId)\n>  {\n> -\tembeddedComplete.emit(bufferId & ipa::rpi::MaskID);\n> +\tembeddedComplete.emit(bufferId & ipa::RPi::MaskID);\n>  }\n>  \n>  void IPARPi::prepareISP(unsigned int bufferId)\n> @@ -1271,7 +1271,7 @@ void IPARPi::applyLS(const struct AlscStatus *lsStatus, ControlList &ctrls)\n>  \t\t.gain_format = GAIN_FORMAT_U4P10\n>  \t};\n>  \n> -\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > ipa::rpi::MaxLsGridSize) {\n> +\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > ipa::RPi::MaxLsGridSize) {\n>  \t\tLOG(IPARPI, Error) << \"Do not have a correctly allocate lens shading table!\";\n>  \t\treturn;\n>  \t}\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 8770ae66a21a..9dd4d112a907 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -166,7 +166,7 @@ public:\n>  \tvoid handleState();\n>  \tvoid applyScalerCrop(const ControlList &controls);\n>  \n> -\tstd::unique_ptr<ipa::rpi::IPAProxyRPi> ipa_;\n> +\tstd::unique_ptr<ipa::RPi::IPAProxyRPi> ipa_;\n>  \n>  \tstd::unique_ptr<CameraSensor> sensor_;\n>  \t/* Array of Unicam and ISP device streams and associated buffers/streams. */\n> @@ -778,8 +778,8 @@ int PipelineHandlerRPi::start(Camera *camera, ControlList *controls)\n>  \t\tdata->applyScalerCrop(*controls);\n>  \n>  \t/* Start the IPA. */\n> -\tipa::rpi::StartControls ipaData;\n> -\tipa::rpi::StartControls result;\n> +\tipa::RPi::StartControls ipaData;\n> +\tipa::RPi::StartControls result;\n>  \tif (controls)\n>  \t\tipaData.controls = *controls;\n>  \tdata->ipa_->start(ipaData, &result);\n> @@ -1114,8 +1114,8 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)\n>  \t * Pass the stats and embedded data buffers to the IPA. No other\n>  \t * buffers need to be passed.\n>  \t */\n> -\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::rpi::MaskStats);\n> -\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::rpi::MaskEmbeddedData);\n> +\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::RPi::MaskStats);\n> +\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::RPi::MaskEmbeddedData);\n>  \n>  \treturn 0;\n>  }\n> @@ -1164,7 +1164,7 @@ void RPiCameraData::frameStarted(uint32_t sequence)\n>  \n>  int RPiCameraData::loadIPA()\n>  {\n> -\tipa_ = IPAManager::createIPA<ipa::rpi::IPAProxyRPi>(pipe_, 1, 1);\n> +\tipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe_, 1, 1);\n>  \n>  \tif (!ipa_)\n>  \t\treturn -ENOENT;\n> @@ -1188,7 +1188,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \n>  \tstd::map<unsigned int, IPAStream> streamConfig;\n>  \tstd::map<unsigned int, ControlInfoMap> entityControls;\n> -\tipa::rpi::ConfigInput ipaConfig;\n> +\tipa::RPi::ConfigInput ipaConfig;\n>  \n>  \t/* Get the device format to pass to the IPA. */\n>  \tV4L2DeviceFormat sensorFormat;\n> @@ -1211,7 +1211,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \n>  \t/* Allocate the lens shading table via dmaHeap and pass to the IPA. */\n>  \tif (!lsTable_.isValid()) {\n> -\t\tlsTable_ = dmaHeap_.alloc(\"ls_grid\", ipa::rpi::MaxLsGridSize);\n> +\t\tlsTable_ = dmaHeap_.alloc(\"ls_grid\", ipa::RPi::MaxLsGridSize);\n>  \t\tif (!lsTable_.isValid())\n>  \t\t\treturn -ENOMEM;\n>  \n> @@ -1231,7 +1231,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \t}\n>  \n>  \t/* Ready the IPA - it must know about the sensor resolution. */\n> -\tipa::rpi::ConfigOutput result;\n> +\tipa::RPi::ConfigOutput result;\n>  \n>  \tipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n>  \t\t\t&result, &ret);\n> @@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>  \t\treturn -EPIPE;\n>  \t}\n>  \n> -\tif (result.params & ipa::rpi::ConfigSensorParams) {\n> +\tif (result.params & ipa::RPi::ConfigSensorParams) {\n>  \t\t/*\n>  \t\t * Setup our delayed control writer with the sensor default\n>  \t\t * gain and exposure delays.\n> @@ -1343,13 +1343,9 @@ void RPiCameraData::setIspControls(const ControlList &controls)\n>  \tif (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {\n>  \t\tSpan<const uint8_t> s =\n>  \t\t\tctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING).data();\n> -\t\tbcm2835_isp_lens_shading ls =\n> -\t\t\t*reinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n> -\t\tls.dmabuf = lsTable_.fd();\n> -\n> -\t\tControlValue c(Span<const uint8_t>{ reinterpret_cast<uint8_t *>(&ls),\n> -\t\t\t\t\t\t    sizeof(ls) });\n> -\t\tctrls.set(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING, c);\n> +\t\tconst bcm2835_isp_lens_shading *ls =\n> +\t\t\treinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n> +\t\tls->dmabuf = lsTable_.fd();\n\nI don't quite understand this hunk. It doesn't seem to match what the\nrest of this patch does, and it's not the final product of the next\npatch (which is what seems to be its purpose).\n\n\nPaul\n\n>  \t}\n>  \n>  \tisp_[Isp::Input].dev()->setControls(&ctrls);\n> @@ -1457,7 +1453,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)\n>  \t * application until after the IPA signals so.\n>  \t */\n>  \tif (stream == &isp_[Isp::Stats]) {\n> -\t\tipa_->signalStatReady(ipa::rpi::MaskStats | static_cast<unsigned int>(index));\n> +\t\tipa_->signalStatReady(ipa::RPi::MaskStats | static_cast<unsigned int>(index));\n>  \t} else {\n>  \t\t/* Any other ISP output can be handed back to the application now. */\n>  \t\thandleStreamBuffer(buffer, stream);\n> @@ -1561,7 +1557,7 @@ void RPiCameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *strea\n>  {\n>  \tunsigned int id = stream->getBufferId(buffer);\n>  \n> -\tif (!(id & ipa::rpi::MaskExternalBuffer))\n> +\tif (!(id & ipa::RPi::MaskExternalBuffer))\n>  \t\treturn;\n>  \n>  \t/* Stop the Stream object from tracking the buffer. */\n> @@ -1693,9 +1689,9 @@ void RPiCameraData::tryRunPipeline()\n>  \t\t\t<< \" Bayer buffer id: \" << bayerId\n>  \t\t\t<< \" Embedded buffer id: \" << embeddedId;\n>  \n> -\tipa::rpi::ISPConfig ispPrepare;\n> -\tispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData | embeddedId;\n> -\tispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId;\n> +\tipa::RPi::ISPConfig ispPrepare;\n> +\tispPrepare.embeddedBufferId = ipa::RPi::MaskEmbeddedData | embeddedId;\n> +\tispPrepare.bayerBufferId = ipa::RPi::MaskBayerData | bayerId;\n>  \tipa_->signalIspPrepare(ispPrepare);\n>  }\n>  \n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> index 496dd36fabbc..f2430415d32d 100644\n> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> @@ -72,7 +72,7 @@ int Stream::getBufferId(FrameBuffer *buffer) const\n>  \n>  void Stream::setExternalBuffer(FrameBuffer *buffer)\n>  {\n> -\tbufferMap_.emplace(ipa::rpi::MaskExternalBuffer | id_.get(), buffer);\n> +\tbufferMap_.emplace(ipa::RPi::MaskExternalBuffer | id_.get(), buffer);\n>  }\n>  \n>  void Stream::removeExternalBuffer(FrameBuffer *buffer)\n> @@ -80,7 +80,7 @@ void Stream::removeExternalBuffer(FrameBuffer *buffer)\n>  \tint id = getBufferId(buffer);\n>  \n>  \t/* Ensure we have this buffer in the stream, and it is marked external. */\n> -\tASSERT(id != -1 && (id & ipa::rpi::MaskExternalBuffer));\n> +\tASSERT(id != -1 && (id & ipa::RPi::MaskExternalBuffer));\n>  \tbufferMap_.erase(id);\n>  }\n>  \n> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> index 701110d04bdb..f1ac715f4221 100644\n> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> @@ -32,13 +32,13 @@ class Stream : public libcamera::Stream\n>  {\n>  public:\n>  \tStream()\n> -\t\t: id_(ipa::rpi::MaskID)\n> +\t\t: id_(ipa::RPi::MaskID)\n>  \t{\n>  \t}\n>  \n>  \tStream(const char *name, MediaEntity *dev, bool importOnly = false)\n>  \t\t: external_(false), importOnly_(importOnly), name_(name),\n> -\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(ipa::rpi::MaskID)\n> +\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(ipa::RPi::MaskID)\n>  \t{\n>  \t}\n>  \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 5F893BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 10:24:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D35CE6381F;\n\tWed, 17 Feb 2021 11:24:57 +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 34BDD637F7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 11:24:57 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A1BB08C4;\n\tWed, 17 Feb 2021 11:24:55 +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=\"KvjTPMx6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613557496;\n\tbh=WqeWH8J3c6CMBZ9+/6+nZl+1tSZGYqKjPPyS30/jPcc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KvjTPMx6L9ycVV276WLSiz5lq5QKOn7z/1YMX70FQex3N0WiInUL0Kx/k34MMn4p0\n\tuPLLSX++gKUbJe201SCyckJdPJR0pRfB1slYafGopS9hOybWS26FKrsptXJMCs1i3c\n\tifNIXXL2W/G5+dCFZs370y5PZnZfi8EiawPzVtC4=","Date":"Wed, 17 Feb 2021 19:24:49 +0900","From":"paul.elder@ideasonboard.com","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20210217102449.GI17707@pyrite.rasen.tech>","References":"<20210217100852.1542397-1-naush@raspberrypi.com>\n\t<20210217100852.1542397-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210217100852.1542397-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","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@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":15204,"web_url":"https://patchwork.libcamera.org/comment/15204/","msgid":"<CAEmqJPpV39nNqqMancBg6BQG-aTxDPvJOZRAe1SrZvyDMuBXbw@mail.gmail.com>","date":"2021-02-17T10:26:59","subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Paul,\n\nOn Wed, 17 Feb 2021 at 10:24, <paul.elder@ideasonboard.com> wrote:\n\n> Hi Naush,\n>\n> On Wed, Feb 17, 2021 at 10:08:51AM +0000, Naushir Patuck wrote:\n> > Rename the IPA interface namespace to ipa::RPi for consistency with\n> > the libcamera::RPi namespace label.\n> >\n> > There is no functional change in this commit.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  include/libcamera/ipa/raspberrypi.mojom       |  2 +-\n> >  src/ipa/raspberrypi/raspberrypi.cpp           | 38 +++++++++---------\n> >  .../pipeline/raspberrypi/raspberrypi.cpp      | 40 +++++++++----------\n> >  .../pipeline/raspberrypi/rpi_stream.cpp       |  4 +-\n> >  .../pipeline/raspberrypi/rpi_stream.h         |  4 +-\n> >  5 files changed, 42 insertions(+), 46 deletions(-)\n> >\n> > diff --git a/include/libcamera/ipa/raspberrypi.mojom\n> b/include/libcamera/ipa/raspberrypi.mojom\n> > index 9c05cc68cceb..5a27b1e4fc2d 100644\n> > --- a/include/libcamera/ipa/raspberrypi.mojom\n> > +++ b/include/libcamera/ipa/raspberrypi.mojom\n> > @@ -1,6 +1,6 @@\n> >  /* SPDX-License-Identifier: LGPL-2.1-or-later */\n> >\n> > -module ipa.rpi;\n> > +module ipa.RPi;\n> >\n> >  import \"include/libcamera/ipa/core.mojom\";\n> >\n> > diff --git a/src/ipa/raspberrypi/raspberrypi.cpp\n> b/src/ipa/raspberrypi/raspberrypi.cpp\n> > index 974f4ec63058..1226ea514521 100644\n> > --- a/src/ipa/raspberrypi/raspberrypi.cpp\n> > +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n> > @@ -63,7 +63,7 @@ constexpr double defaultMaxFrameDuration = 1e6 / 0.01;\n> >\n> >  LOG_DEFINE_CATEGORY(IPARPI)\n> >\n> > -class IPARPi : public ipa::rpi::IPARPiInterface\n> > +class IPARPi : public ipa::RPi::IPARPiInterface\n> >  {\n> >  public:\n> >       IPARPi()\n> > @@ -76,24 +76,24 @@ public:\n> >       ~IPARPi()\n> >       {\n> >               if (lsTable_)\n> > -                     munmap(lsTable_, ipa::rpi::MaxLsGridSize);\n> > +                     munmap(lsTable_, ipa::RPi::MaxLsGridSize);\n> >       }\n> >\n> >       int init(const IPASettings &settings) override;\n> > -     void start(const ipa::rpi::StartControls &data,\n> > -                ipa::rpi::StartControls *result) override;\n> > +     void start(const ipa::RPi::StartControls &data,\n> > +                ipa::RPi::StartControls *result) override;\n> >       void stop() override {}\n> >\n> >       void configure(const CameraSensorInfo &sensorInfo,\n> >                      const std::map<unsigned int, IPAStream>\n> &streamConfig,\n> >                      const std::map<unsigned int, ControlInfoMap>\n> &entityControls,\n> > -                    const ipa::rpi::ConfigInput &data,\n> > -                    ipa::rpi::ConfigOutput *response, int32_t *ret)\n> override;\n> > +                    const ipa::RPi::ConfigInput &data,\n> > +                    ipa::RPi::ConfigOutput *response, int32_t *ret)\n> override;\n> >       void mapBuffers(const std::vector<IPABuffer> &buffers) override;\n> >       void unmapBuffers(const std::vector<unsigned int> &ids) override;\n> >       void signalStatReady(const uint32_t bufferId) override;\n> >       void signalQueueRequest(const ControlList &controls) override;\n> > -     void signalIspPrepare(const ipa::rpi::ISPConfig &data) override;\n> > +     void signalIspPrepare(const ipa::RPi::ISPConfig &data) override;\n> >\n> >  private:\n> >       void setMode(const CameraSensorInfo &sensorInfo);\n> > @@ -168,8 +168,8 @@ int IPARPi::init(const IPASettings &settings)\n> >       return 0;\n> >  }\n> >\n> > -void IPARPi::start(const ipa::rpi::StartControls &data,\n> > -                ipa::rpi::StartControls *result)\n> > +void IPARPi::start(const ipa::RPi::StartControls &data,\n> > +                ipa::RPi::StartControls *result)\n> >  {\n> >       RPiController::Metadata metadata;\n> >\n> > @@ -291,8 +291,8 @@ void IPARPi::setMode(const CameraSensorInfo\n> &sensorInfo)\n> >  void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n> >                      [[maybe_unused]] const std::map<unsigned int,\n> IPAStream> &streamConfig,\n> >                      const std::map<unsigned int, ControlInfoMap>\n> &entityControls,\n> > -                    const ipa::rpi::ConfigInput &ipaConfig,\n> > -                    ipa::rpi::ConfigOutput *result, int32_t *ret)\n> > +                    const ipa::RPi::ConfigInput &ipaConfig,\n> > +                    ipa::RPi::ConfigOutput *result, int32_t *ret)\n> >  {\n> >       if (entityControls.size() != 2) {\n> >               LOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n> > @@ -344,7 +344,7 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >               helper_->GetDelays(exposureDelay, gainDelay);\n> >               sensorMetadata = helper_->SensorEmbeddedDataPresent();\n> >\n> > -             result->params |= ipa::rpi::ConfigSensorParams;\n> > +             result->params |= ipa::RPi::ConfigSensorParams;\n> >               result->sensorConfig.gainDelay = gainDelay;\n> >               result->sensorConfig.exposureDelay = exposureDelay;\n> >               result->sensorConfig.vblank = exposureDelay;\n> > @@ -360,14 +360,14 @@ void IPARPi::configure(const CameraSensorInfo\n> &sensorInfo,\n> >       if (ipaConfig.lsTableHandle.isValid()) {\n> >               /* Remove any previous table, if there was one. */\n> >               if (lsTable_) {\n> > -                     munmap(lsTable_, ipa::rpi::MaxLsGridSize);\n> > +                     munmap(lsTable_, ipa::RPi::MaxLsGridSize);\n> >                       lsTable_ = nullptr;\n> >               }\n> >\n> >               /* Map the LS table buffer into user space. */\n> >               lsTableHandle_ = std::move(ipaConfig.lsTableHandle);\n> >               if (lsTableHandle_.isValid()) {\n> > -                     lsTable_ = mmap(nullptr, ipa::rpi::MaxLsGridSize,\n> PROT_READ | PROT_WRITE,\n> > +                     lsTable_ = mmap(nullptr, ipa::RPi::MaxLsGridSize,\n> PROT_READ | PROT_WRITE,\n> >                                       MAP_SHARED, lsTableHandle_.fd(),\n> 0);\n> >\n> >                       if (lsTable_ == MAP_FAILED) {\n> > @@ -432,7 +432,7 @@ void IPARPi::signalStatReady(uint32_t bufferId)\n> >\n> >       reportMetadata();\n> >\n> > -     statsMetadataComplete.emit(bufferId & ipa::rpi::MaskID,\n> libcameraMetadata_);\n> > +     statsMetadataComplete.emit(bufferId & ipa::RPi::MaskID,\n> libcameraMetadata_);\n> >  }\n> >\n> >  void IPARPi::signalQueueRequest(const ControlList &controls)\n> > @@ -440,7 +440,7 @@ void IPARPi::signalQueueRequest(const ControlList\n> &controls)\n> >       queueRequest(controls);\n> >  }\n> >\n> > -void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)\n> > +void IPARPi::signalIspPrepare(const ipa::RPi::ISPConfig &data)\n> >  {\n> >       /*\n> >        * At start-up, or after a mode-switch, we may want to\n> > @@ -451,7 +451,7 @@ void IPARPi::signalIspPrepare(const\n> ipa::rpi::ISPConfig &data)\n> >       frameCount_++;\n> >\n> >       /* Ready to push the input buffer into the ISP. */\n> > -     runIsp.emit(data.bayerBufferId & ipa::rpi::MaskID);\n> > +     runIsp.emit(data.bayerBufferId & ipa::RPi::MaskID);\n> >  }\n> >\n> >  void IPARPi::reportMetadata()\n> > @@ -906,7 +906,7 @@ void IPARPi::queueRequest(const ControlList\n> &controls)\n> >\n> >  void IPARPi::returnEmbeddedBuffer(unsigned int bufferId)\n> >  {\n> > -     embeddedComplete.emit(bufferId & ipa::rpi::MaskID);\n> > +     embeddedComplete.emit(bufferId & ipa::RPi::MaskID);\n> >  }\n> >\n> >  void IPARPi::prepareISP(unsigned int bufferId)\n> > @@ -1271,7 +1271,7 @@ void IPARPi::applyLS(const struct AlscStatus\n> *lsStatus, ControlList &ctrls)\n> >               .gain_format = GAIN_FORMAT_U4P10\n> >       };\n> >\n> > -     if (!lsTable_ || w * h * 4 * sizeof(uint16_t) >\n> ipa::rpi::MaxLsGridSize) {\n> > +     if (!lsTable_ || w * h * 4 * sizeof(uint16_t) >\n> ipa::RPi::MaxLsGridSize) {\n> >               LOG(IPARPI, Error) << \"Do not have a correctly allocate\n> lens shading table!\";\n> >               return;\n> >       }\n> > diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > index 8770ae66a21a..9dd4d112a907 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> > @@ -166,7 +166,7 @@ public:\n> >       void handleState();\n> >       void applyScalerCrop(const ControlList &controls);\n> >\n> > -     std::unique_ptr<ipa::rpi::IPAProxyRPi> ipa_;\n> > +     std::unique_ptr<ipa::RPi::IPAProxyRPi> ipa_;\n> >\n> >       std::unique_ptr<CameraSensor> sensor_;\n> >       /* Array of Unicam and ISP device streams and associated\n> buffers/streams. */\n> > @@ -778,8 +778,8 @@ int PipelineHandlerRPi::start(Camera *camera,\n> ControlList *controls)\n> >               data->applyScalerCrop(*controls);\n> >\n> >       /* Start the IPA. */\n> > -     ipa::rpi::StartControls ipaData;\n> > -     ipa::rpi::StartControls result;\n> > +     ipa::RPi::StartControls ipaData;\n> > +     ipa::RPi::StartControls result;\n> >       if (controls)\n> >               ipaData.controls = *controls;\n> >       data->ipa_->start(ipaData, &result);\n> > @@ -1114,8 +1114,8 @@ int PipelineHandlerRPi::prepareBuffers(Camera\n> *camera)\n> >        * Pass the stats and embedded data buffers to the IPA. No other\n> >        * buffers need to be passed.\n> >        */\n> > -     mapBuffers(camera, data->isp_[Isp::Stats].getBuffers(),\n> ipa::rpi::MaskStats);\n> > -     mapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(),\n> ipa::rpi::MaskEmbeddedData);\n> > +     mapBuffers(camera, data->isp_[Isp::Stats].getBuffers(),\n> ipa::RPi::MaskStats);\n> > +     mapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(),\n> ipa::RPi::MaskEmbeddedData);\n> >\n> >       return 0;\n> >  }\n> > @@ -1164,7 +1164,7 @@ void RPiCameraData::frameStarted(uint32_t sequence)\n> >\n> >  int RPiCameraData::loadIPA()\n> >  {\n> > -     ipa_ = IPAManager::createIPA<ipa::rpi::IPAProxyRPi>(pipe_, 1, 1);\n> > +     ipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe_, 1, 1);\n> >\n> >       if (!ipa_)\n> >               return -ENOENT;\n> > @@ -1188,7 +1188,7 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >\n> >       std::map<unsigned int, IPAStream> streamConfig;\n> >       std::map<unsigned int, ControlInfoMap> entityControls;\n> > -     ipa::rpi::ConfigInput ipaConfig;\n> > +     ipa::RPi::ConfigInput ipaConfig;\n> >\n> >       /* Get the device format to pass to the IPA. */\n> >       V4L2DeviceFormat sensorFormat;\n> > @@ -1211,7 +1211,7 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >\n> >       /* Allocate the lens shading table via dmaHeap and pass to the\n> IPA. */\n> >       if (!lsTable_.isValid()) {\n> > -             lsTable_ = dmaHeap_.alloc(\"ls_grid\",\n> ipa::rpi::MaxLsGridSize);\n> > +             lsTable_ = dmaHeap_.alloc(\"ls_grid\",\n> ipa::RPi::MaxLsGridSize);\n> >               if (!lsTable_.isValid())\n> >                       return -ENOMEM;\n> >\n> > @@ -1231,7 +1231,7 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >       }\n> >\n> >       /* Ready the IPA - it must know about the sensor resolution. */\n> > -     ipa::rpi::ConfigOutput result;\n> > +     ipa::RPi::ConfigOutput result;\n> >\n> >       ipa_->configure(sensorInfo_, streamConfig, entityControls,\n> ipaConfig,\n> >                       &result, &ret);\n> > @@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const\n> CameraConfiguration *config)\n> >               return -EPIPE;\n> >       }\n> >\n> > -     if (result.params & ipa::rpi::ConfigSensorParams) {\n> > +     if (result.params & ipa::RPi::ConfigSensorParams) {\n> >               /*\n> >                * Setup our delayed control writer with the sensor default\n> >                * gain and exposure delays.\n> > @@ -1343,13 +1343,9 @@ void RPiCameraData::setIspControls(const\n> ControlList &controls)\n> >       if (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {\n> >               Span<const uint8_t> s =\n> >\n>  ctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING).data();\n> > -             bcm2835_isp_lens_shading ls =\n> > -                     *reinterpret_cast<const bcm2835_isp_lens_shading\n> *>(s.data());\n> > -             ls.dmabuf = lsTable_.fd();\n> > -\n> > -             ControlValue c(Span<const uint8_t>{\n> reinterpret_cast<uint8_t *>(&ls),\n> > -                                                 sizeof(ls) });\n> > -             ctrls.set(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING, c);\n> > +             const bcm2835_isp_lens_shading *ls =\n> > +                     reinterpret_cast<const bcm2835_isp_lens_shading\n> *>(s.data());\n> > +             ls->dmabuf = lsTable_.fd();\n>\n> I don't quite understand this hunk. It doesn't seem to match what the\n> rest of this patch does, and it's not the final product of the next\n> patch (which is what seems to be its purpose).\n>\n\nApologies, this was an error, it should be in the next patch.  I will fix\nand post an update.\n\nNaush\n\n\n>\n>\n> Paul\n>\n> >       }\n> >\n> >       isp_[Isp::Input].dev()->setControls(&ctrls);\n> > @@ -1457,7 +1453,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer\n> *buffer)\n> >        * application until after the IPA signals so.\n> >        */\n> >       if (stream == &isp_[Isp::Stats]) {\n> > -             ipa_->signalStatReady(ipa::rpi::MaskStats |\n> static_cast<unsigned int>(index));\n> > +             ipa_->signalStatReady(ipa::RPi::MaskStats |\n> static_cast<unsigned int>(index));\n> >       } else {\n> >               /* Any other ISP output can be handed back to the\n> application now. */\n> >               handleStreamBuffer(buffer, stream);\n> > @@ -1561,7 +1557,7 @@ void\n> RPiCameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *strea\n> >  {\n> >       unsigned int id = stream->getBufferId(buffer);\n> >\n> > -     if (!(id & ipa::rpi::MaskExternalBuffer))\n> > +     if (!(id & ipa::RPi::MaskExternalBuffer))\n> >               return;\n> >\n> >       /* Stop the Stream object from tracking the buffer. */\n> > @@ -1693,9 +1689,9 @@ void RPiCameraData::tryRunPipeline()\n> >                       << \" Bayer buffer id: \" << bayerId\n> >                       << \" Embedded buffer id: \" << embeddedId;\n> >\n> > -     ipa::rpi::ISPConfig ispPrepare;\n> > -     ispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData |\n> embeddedId;\n> > -     ispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId;\n> > +     ipa::RPi::ISPConfig ispPrepare;\n> > +     ispPrepare.embeddedBufferId = ipa::RPi::MaskEmbeddedData |\n> embeddedId;\n> > +     ispPrepare.bayerBufferId = ipa::RPi::MaskBayerData | bayerId;\n> >       ipa_->signalIspPrepare(ispPrepare);\n> >  }\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > index 496dd36fabbc..f2430415d32d 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n> > @@ -72,7 +72,7 @@ int Stream::getBufferId(FrameBuffer *buffer) const\n> >\n> >  void Stream::setExternalBuffer(FrameBuffer *buffer)\n> >  {\n> > -     bufferMap_.emplace(ipa::rpi::MaskExternalBuffer | id_.get(),\n> buffer);\n> > +     bufferMap_.emplace(ipa::RPi::MaskExternalBuffer | id_.get(),\n> buffer);\n> >  }\n> >\n> >  void Stream::removeExternalBuffer(FrameBuffer *buffer)\n> > @@ -80,7 +80,7 @@ void Stream::removeExternalBuffer(FrameBuffer *buffer)\n> >       int id = getBufferId(buffer);\n> >\n> >       /* Ensure we have this buffer in the stream, and it is marked\n> external. */\n> > -     ASSERT(id != -1 && (id & ipa::rpi::MaskExternalBuffer));\n> > +     ASSERT(id != -1 && (id & ipa::RPi::MaskExternalBuffer));\n> >       bufferMap_.erase(id);\n> >  }\n> >\n> > diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > index 701110d04bdb..f1ac715f4221 100644\n> > --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n> > @@ -32,13 +32,13 @@ class Stream : public libcamera::Stream\n> >  {\n> >  public:\n> >       Stream()\n> > -             : id_(ipa::rpi::MaskID)\n> > +             : id_(ipa::RPi::MaskID)\n> >       {\n> >       }\n> >\n> >       Stream(const char *name, MediaEntity *dev, bool importOnly = false)\n> >               : external_(false), importOnly_(importOnly), name_(name),\n> > -               dev_(std::make_unique<V4L2VideoDevice>(dev)),\n> id_(ipa::rpi::MaskID)\n> > +               dev_(std::make_unique<V4L2VideoDevice>(dev)),\n> id_(ipa::RPi::MaskID)\n> >       {\n> >       }\n> >\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 352CDBD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 17 Feb 2021 10:27:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0124D68110;\n\tWed, 17 Feb 2021 11:27:17 +0100 (CET)","from mail-lj1-x235.google.com (mail-lj1-x235.google.com\n\t[IPv6:2a00:1450:4864:20::235])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E17D26380C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 11:27:15 +0100 (CET)","by mail-lj1-x235.google.com with SMTP id e17so15389467ljl.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Feb 2021 02:27:15 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"sl5bQX+O\"; dkim-atps=neutral","DKIM-Signature":"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=NRz+qDXYYlk2amB9Y1MtSqIhGbl2WgI1n/Z1//6W8ls=;\n\tb=sl5bQX+OYvnYJURqBG4dZfSj830QMXbNHTRNBK5gcO843sP1TlNFGC3BE2NDjiIYGr\n\tYdjzGBcRTuU0TsFD3QE3VGQC9coyQY0Cppd6aKKb44lQQZ/M7C15jJSrHM0jGcMd2r2+\n\tfLBoLiiHzRHk4YRGtg/byal56CQ8but16DN9I5KQ7o+BXas/O8WC2jkd9jG3vLEGLg19\n\t8HFmqsQVvGycz8+j3NwMy+W5geItVU7p3qtaV60AN6GIZOCU83M6XTvlP7Zta8wcRV+7\n\t2YTWjhpso6AU8M2Jo1ctynweTY7Q9NxInN2e/eHIonbUYZetCoO5wXkrNTj+nfJH04N8\n\t609Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=NRz+qDXYYlk2amB9Y1MtSqIhGbl2WgI1n/Z1//6W8ls=;\n\tb=ng/6Jz1Msg7Gr+vwALsuWytBBCPfVypZw2pR61SfBw/dm6v/Vb8v4+AJNmvw6rgNql\n\tIU4qRhJEvbrciRe0PhuP0BuGZ47zSs9svIlFJGX07VreZUrUslye02dIeb61cdldoGK1\n\tgWBo4TPnXb2sKMLfsj9V7zXDxGK5keI9tFDOoOqkGO0LFTOHX7otwzllyev7llCey67o\n\tBqIsVzFhtHp1UJ2m/d9vdHyy4AX4qM8B4bZm0r9W20mjC94Bi0UytUCiEJDbg5E8ggm1\n\tOXGwwm1o/oTTzIcwdez0GyVSM5ON3GN1PshDYtBFFqwVhJayQ3sGAHx5NshVn6XKQkR7\n\t2K/g==","X-Gm-Message-State":"AOAM531gtOQ9yTErLEuep/UxQADMMKWffIdf8aA2Gc8nVapD+DFRH+Ra\n\tdTkkANHfcQAMziZmwDPY1NSj7o8GsHGilq9IfjRNZKWGa/rAIw==","X-Google-Smtp-Source":"ABdhPJylgyQus5u65p07MmVAKZyk7Wsoj7kORiiYhuqPH1YIymeSa3JFR1y3eoPdQnscDlJfbtmxicEpapaYX/ZqBQQ=","X-Received":"by 2002:a05:651c:2108:: with SMTP id\n\ta8mr14343996ljq.329.1613557635343; \n\tWed, 17 Feb 2021 02:27:15 -0800 (PST)","MIME-Version":"1.0","References":"<20210217100852.1542397-1-naush@raspberrypi.com>\n\t<20210217100852.1542397-2-naush@raspberrypi.com>\n\t<20210217102449.GI17707@pyrite.rasen.tech>","In-Reply-To":"<20210217102449.GI17707@pyrite.rasen.tech>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 17 Feb 2021 10:26:59 +0000","Message-ID":"<CAEmqJPpV39nNqqMancBg6BQG-aTxDPvJOZRAe1SrZvyDMuBXbw@mail.gmail.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","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":"multipart/mixed;\n\tboundary=\"===============8622680214747772176==\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":15210,"web_url":"https://patchwork.libcamera.org/comment/15210/","msgid":"<79e509c8-eaa7-29d7-4130-d43ff5530846@ideasonboard.com>","date":"2021-02-18T11:11:42","subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Naush,\n\nOn 17/02/2021 10:24, paul.elder@ideasonboard.com wrote:\n> Hi Naush,\n> \n> On Wed, Feb 17, 2021 at 10:08:51AM +0000, Naushir Patuck wrote:\n>> Rename the IPA interface namespace to ipa::RPi for consistency with\n>> the libcamera::RPi namespace label.\n>>\n>> There is no functional change in this commit.\n>>\n>> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n>> ---\n>>  include/libcamera/ipa/raspberrypi.mojom       |  2 +-\n>>  src/ipa/raspberrypi/raspberrypi.cpp           | 38 +++++++++---------\n>>  .../pipeline/raspberrypi/raspberrypi.cpp      | 40 +++++++++----------\n>>  .../pipeline/raspberrypi/rpi_stream.cpp       |  4 +-\n>>  .../pipeline/raspberrypi/rpi_stream.h         |  4 +-\n>>  5 files changed, 42 insertions(+), 46 deletions(-)\n>>\n>> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom\n>> index 9c05cc68cceb..5a27b1e4fc2d 100644\n>> --- a/include/libcamera/ipa/raspberrypi.mojom\n>> +++ b/include/libcamera/ipa/raspberrypi.mojom\n>> @@ -1,6 +1,6 @@\n>>  /* SPDX-License-Identifier: LGPL-2.1-or-later */\n>>  \n>> -module ipa.rpi;\n>> +module ipa.RPi;\n>>  \n>>  import \"include/libcamera/ipa/core.mojom\";\n>>  \n>> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\n>> index 974f4ec63058..1226ea514521 100644\n>> --- a/src/ipa/raspberrypi/raspberrypi.cpp\n>> +++ b/src/ipa/raspberrypi/raspberrypi.cpp\n>> @@ -63,7 +63,7 @@ constexpr double defaultMaxFrameDuration = 1e6 / 0.01;\n>>  \n>>  LOG_DEFINE_CATEGORY(IPARPI)\n>>  \n>> -class IPARPi : public ipa::rpi::IPARPiInterface\n>> +class IPARPi : public ipa::RPi::IPARPiInterface\n>>  {\n>>  public:\n>>  \tIPARPi()\n>> @@ -76,24 +76,24 @@ public:\n>>  \t~IPARPi()\n>>  \t{\n>>  \t\tif (lsTable_)\n>> -\t\t\tmunmap(lsTable_, ipa::rpi::MaxLsGridSize);\n>> +\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n>>  \t}\n>>  \n>>  \tint init(const IPASettings &settings) override;\n>> -\tvoid start(const ipa::rpi::StartControls &data,\n>> -\t\t   ipa::rpi::StartControls *result) override;\n>> +\tvoid start(const ipa::RPi::StartControls &data,\n>> +\t\t   ipa::RPi::StartControls *result) override;\n>>  \tvoid stop() override {}\n>>  \n>>  \tvoid configure(const CameraSensorInfo &sensorInfo,\n>>  \t\t       const std::map<unsigned int, IPAStream> &streamConfig,\n>>  \t\t       const std::map<unsigned int, ControlInfoMap> &entityControls,\n>> -\t\t       const ipa::rpi::ConfigInput &data,\n>> -\t\t       ipa::rpi::ConfigOutput *response, int32_t *ret) override;\n>> +\t\t       const ipa::RPi::ConfigInput &data,\n>> +\t\t       ipa::RPi::ConfigOutput *response, int32_t *ret) override;\n>>  \tvoid mapBuffers(const std::vector<IPABuffer> &buffers) override;\n>>  \tvoid unmapBuffers(const std::vector<unsigned int> &ids) override;\n>>  \tvoid signalStatReady(const uint32_t bufferId) override;\n>>  \tvoid signalQueueRequest(const ControlList &controls) override;\n>> -\tvoid signalIspPrepare(const ipa::rpi::ISPConfig &data) override;\n>> +\tvoid signalIspPrepare(const ipa::RPi::ISPConfig &data) override;\n>>  \n>>  private:\n>>  \tvoid setMode(const CameraSensorInfo &sensorInfo);\n>> @@ -168,8 +168,8 @@ int IPARPi::init(const IPASettings &settings)\n>>  \treturn 0;\n>>  }\n>>  \n>> -void IPARPi::start(const ipa::rpi::StartControls &data,\n>> -\t\t   ipa::rpi::StartControls *result)\n>> +void IPARPi::start(const ipa::RPi::StartControls &data,\n>> +\t\t   ipa::RPi::StartControls *result)\n>>  {\n>>  \tRPiController::Metadata metadata;\n>>  \n>> @@ -291,8 +291,8 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)\n>>  void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>>  \t\t       [[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,\n>>  \t\t       const std::map<unsigned int, ControlInfoMap> &entityControls,\n>> -\t\t       const ipa::rpi::ConfigInput &ipaConfig,\n>> -\t\t       ipa::rpi::ConfigOutput *result, int32_t *ret)\n>> +\t\t       const ipa::RPi::ConfigInput &ipaConfig,\n>> +\t\t       ipa::RPi::ConfigOutput *result, int32_t *ret)\n>>  {\n>>  \tif (entityControls.size() != 2) {\n>>  \t\tLOG(IPARPI, Error) << \"No ISP or sensor controls found.\";\n>> @@ -344,7 +344,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>>  \t\thelper_->GetDelays(exposureDelay, gainDelay);\n>>  \t\tsensorMetadata = helper_->SensorEmbeddedDataPresent();\n>>  \n>> -\t\tresult->params |= ipa::rpi::ConfigSensorParams;\n>> +\t\tresult->params |= ipa::RPi::ConfigSensorParams;\n>>  \t\tresult->sensorConfig.gainDelay = gainDelay;\n>>  \t\tresult->sensorConfig.exposureDelay = exposureDelay;\n>>  \t\tresult->sensorConfig.vblank = exposureDelay;\n>> @@ -360,14 +360,14 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n>>  \tif (ipaConfig.lsTableHandle.isValid()) {\n>>  \t\t/* Remove any previous table, if there was one. */\n>>  \t\tif (lsTable_) {\n>> -\t\t\tmunmap(lsTable_, ipa::rpi::MaxLsGridSize);\n>> +\t\t\tmunmap(lsTable_, ipa::RPi::MaxLsGridSize);\n>>  \t\t\tlsTable_ = nullptr;\n>>  \t\t}\n>>  \n>>  \t\t/* Map the LS table buffer into user space. */\n>>  \t\tlsTableHandle_ = std::move(ipaConfig.lsTableHandle);\n>>  \t\tif (lsTableHandle_.isValid()) {\n>> -\t\t\tlsTable_ = mmap(nullptr, ipa::rpi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n>> +\t\t\tlsTable_ = mmap(nullptr, ipa::RPi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n>>  \t\t\t\t\tMAP_SHARED, lsTableHandle_.fd(), 0);\n>>  \n>>  \t\t\tif (lsTable_ == MAP_FAILED) {\n>> @@ -432,7 +432,7 @@ void IPARPi::signalStatReady(uint32_t bufferId)\n>>  \n>>  \treportMetadata();\n>>  \n>> -\tstatsMetadataComplete.emit(bufferId & ipa::rpi::MaskID, libcameraMetadata_);\n>> +\tstatsMetadataComplete.emit(bufferId & ipa::RPi::MaskID, libcameraMetadata_);\n>>  }\n>>  \n>>  void IPARPi::signalQueueRequest(const ControlList &controls)\n>> @@ -440,7 +440,7 @@ void IPARPi::signalQueueRequest(const ControlList &controls)\n>>  \tqueueRequest(controls);\n>>  }\n>>  \n>> -void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)\n>> +void IPARPi::signalIspPrepare(const ipa::RPi::ISPConfig &data)\n>>  {\n>>  \t/*\n>>  \t * At start-up, or after a mode-switch, we may want to\n>> @@ -451,7 +451,7 @@ void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)\n>>  \tframeCount_++;\n>>  \n>>  \t/* Ready to push the input buffer into the ISP. */\n>> -\trunIsp.emit(data.bayerBufferId & ipa::rpi::MaskID);\n>> +\trunIsp.emit(data.bayerBufferId & ipa::RPi::MaskID);\n>>  }\n>>  \n>>  void IPARPi::reportMetadata()\n>> @@ -906,7 +906,7 @@ void IPARPi::queueRequest(const ControlList &controls)\n>>  \n>>  void IPARPi::returnEmbeddedBuffer(unsigned int bufferId)\n>>  {\n>> -\tembeddedComplete.emit(bufferId & ipa::rpi::MaskID);\n>> +\tembeddedComplete.emit(bufferId & ipa::RPi::MaskID);\n>>  }\n>>  \n>>  void IPARPi::prepareISP(unsigned int bufferId)\n>> @@ -1271,7 +1271,7 @@ void IPARPi::applyLS(const struct AlscStatus *lsStatus, ControlList &ctrls)\n>>  \t\t.gain_format = GAIN_FORMAT_U4P10\n>>  \t};\n>>  \n>> -\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > ipa::rpi::MaxLsGridSize) {\n>> +\tif (!lsTable_ || w * h * 4 * sizeof(uint16_t) > ipa::RPi::MaxLsGridSize) {\n>>  \t\tLOG(IPARPI, Error) << \"Do not have a correctly allocate lens shading table!\";\n>>  \t\treturn;\n>>  \t}\n>> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> index 8770ae66a21a..9dd4d112a907 100644\n>> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n>> @@ -166,7 +166,7 @@ public:\n>>  \tvoid handleState();\n>>  \tvoid applyScalerCrop(const ControlList &controls);\n>>  \n>> -\tstd::unique_ptr<ipa::rpi::IPAProxyRPi> ipa_;\n>> +\tstd::unique_ptr<ipa::RPi::IPAProxyRPi> ipa_;\n>>  \n>>  \tstd::unique_ptr<CameraSensor> sensor_;\n>>  \t/* Array of Unicam and ISP device streams and associated buffers/streams. */\n>> @@ -778,8 +778,8 @@ int PipelineHandlerRPi::start(Camera *camera, ControlList *controls)\n>>  \t\tdata->applyScalerCrop(*controls);\n>>  \n>>  \t/* Start the IPA. */\n>> -\tipa::rpi::StartControls ipaData;\n>> -\tipa::rpi::StartControls result;\n>> +\tipa::RPi::StartControls ipaData;\n>> +\tipa::RPi::StartControls result;\n>>  \tif (controls)\n>>  \t\tipaData.controls = *controls;\n>>  \tdata->ipa_->start(ipaData, &result);\n>> @@ -1114,8 +1114,8 @@ int PipelineHandlerRPi::prepareBuffers(Camera *camera)\n>>  \t * Pass the stats and embedded data buffers to the IPA. No other\n>>  \t * buffers need to be passed.\n>>  \t */\n>> -\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::rpi::MaskStats);\n>> -\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::rpi::MaskEmbeddedData);\n>> +\tmapBuffers(camera, data->isp_[Isp::Stats].getBuffers(), ipa::RPi::MaskStats);\n>> +\tmapBuffers(camera, data->unicam_[Unicam::Embedded].getBuffers(), ipa::RPi::MaskEmbeddedData);\n>>  \n>>  \treturn 0;\n>>  }\n>> @@ -1164,7 +1164,7 @@ void RPiCameraData::frameStarted(uint32_t sequence)\n>>  \n>>  int RPiCameraData::loadIPA()\n>>  {\n>> -\tipa_ = IPAManager::createIPA<ipa::rpi::IPAProxyRPi>(pipe_, 1, 1);\n>> +\tipa_ = IPAManager::createIPA<ipa::RPi::IPAProxyRPi>(pipe_, 1, 1);\n>>  \n>>  \tif (!ipa_)\n>>  \t\treturn -ENOENT;\n>> @@ -1188,7 +1188,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>>  \n>>  \tstd::map<unsigned int, IPAStream> streamConfig;\n>>  \tstd::map<unsigned int, ControlInfoMap> entityControls;\n>> -\tipa::rpi::ConfigInput ipaConfig;\n>> +\tipa::RPi::ConfigInput ipaConfig;\n>>  \n>>  \t/* Get the device format to pass to the IPA. */\n>>  \tV4L2DeviceFormat sensorFormat;\n>> @@ -1211,7 +1211,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>>  \n>>  \t/* Allocate the lens shading table via dmaHeap and pass to the IPA. */\n>>  \tif (!lsTable_.isValid()) {\n>> -\t\tlsTable_ = dmaHeap_.alloc(\"ls_grid\", ipa::rpi::MaxLsGridSize);\n>> +\t\tlsTable_ = dmaHeap_.alloc(\"ls_grid\", ipa::RPi::MaxLsGridSize);\n>>  \t\tif (!lsTable_.isValid())\n>>  \t\t\treturn -ENOMEM;\n>>  \n>> @@ -1231,7 +1231,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>>  \t}\n>>  \n>>  \t/* Ready the IPA - it must know about the sensor resolution. */\n>> -\tipa::rpi::ConfigOutput result;\n>> +\tipa::RPi::ConfigOutput result;\n>>  \n>>  \tipa_->configure(sensorInfo_, streamConfig, entityControls, ipaConfig,\n>>  \t\t\t&result, &ret);\n>> @@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)\n>>  \t\treturn -EPIPE;\n>>  \t}\n>>  \n>> -\tif (result.params & ipa::rpi::ConfigSensorParams) {\n>> +\tif (result.params & ipa::RPi::ConfigSensorParams) {\n>>  \t\t/*\n>>  \t\t * Setup our delayed control writer with the sensor default\n>>  \t\t * gain and exposure delays.\n>> @@ -1343,13 +1343,9 @@ void RPiCameraData::setIspControls(const ControlList &controls)\n>>  \tif (ctrls.contains(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING)) {\n>>  \t\tSpan<const uint8_t> s =\n>>  \t\t\tctrls.get(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING).data();\n>> -\t\tbcm2835_isp_lens_shading ls =\n>> -\t\t\t*reinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n>> -\t\tls.dmabuf = lsTable_.fd();\n>> -\n>> -\t\tControlValue c(Span<const uint8_t>{ reinterpret_cast<uint8_t *>(&ls),\n>> -\t\t\t\t\t\t    sizeof(ls) });\n>> -\t\tctrls.set(V4L2_CID_USER_BCM2835_ISP_LENS_SHADING, c);\n>> +\t\tconst bcm2835_isp_lens_shading *ls =\n>> +\t\t\treinterpret_cast<const bcm2835_isp_lens_shading *>(s.data());\n>> +\t\tls->dmabuf = lsTable_.fd();\n> \n> I don't quite understand this hunk. It doesn't seem to match what the\n> rest of this patch does, and it's not the final product of the next\n> patch (which is what seems to be its purpose).\n\n\nWith this hunk removed:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n> Paul\n> \n>>  \t}\n>>  \n>>  \tisp_[Isp::Input].dev()->setControls(&ctrls);\n>> @@ -1457,7 +1453,7 @@ void RPiCameraData::ispOutputDequeue(FrameBuffer *buffer)\n>>  \t * application until after the IPA signals so.\n>>  \t */\n>>  \tif (stream == &isp_[Isp::Stats]) {\n>> -\t\tipa_->signalStatReady(ipa::rpi::MaskStats | static_cast<unsigned int>(index));\n>> +\t\tipa_->signalStatReady(ipa::RPi::MaskStats | static_cast<unsigned int>(index));\n>>  \t} else {\n>>  \t\t/* Any other ISP output can be handed back to the application now. */\n>>  \t\thandleStreamBuffer(buffer, stream);\n>> @@ -1561,7 +1557,7 @@ void RPiCameraData::handleExternalBuffer(FrameBuffer *buffer, RPi::Stream *strea\n>>  {\n>>  \tunsigned int id = stream->getBufferId(buffer);\n>>  \n>> -\tif (!(id & ipa::rpi::MaskExternalBuffer))\n>> +\tif (!(id & ipa::RPi::MaskExternalBuffer))\n>>  \t\treturn;\n>>  \n>>  \t/* Stop the Stream object from tracking the buffer. */\n>> @@ -1693,9 +1689,9 @@ void RPiCameraData::tryRunPipeline()\n>>  \t\t\t<< \" Bayer buffer id: \" << bayerId\n>>  \t\t\t<< \" Embedded buffer id: \" << embeddedId;\n>>  \n>> -\tipa::rpi::ISPConfig ispPrepare;\n>> -\tispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData | embeddedId;\n>> -\tispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId;\n>> +\tipa::RPi::ISPConfig ispPrepare;\n>> +\tispPrepare.embeddedBufferId = ipa::RPi::MaskEmbeddedData | embeddedId;\n>> +\tispPrepare.bayerBufferId = ipa::RPi::MaskBayerData | bayerId;\n>>  \tipa_->signalIspPrepare(ispPrepare);\n>>  }\n>>  \n>> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> index 496dd36fabbc..f2430415d32d 100644\n>> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.cpp\n>> @@ -72,7 +72,7 @@ int Stream::getBufferId(FrameBuffer *buffer) const\n>>  \n>>  void Stream::setExternalBuffer(FrameBuffer *buffer)\n>>  {\n>> -\tbufferMap_.emplace(ipa::rpi::MaskExternalBuffer | id_.get(), buffer);\n>> +\tbufferMap_.emplace(ipa::RPi::MaskExternalBuffer | id_.get(), buffer);\n>>  }\n>>  \n>>  void Stream::removeExternalBuffer(FrameBuffer *buffer)\n>> @@ -80,7 +80,7 @@ void Stream::removeExternalBuffer(FrameBuffer *buffer)\n>>  \tint id = getBufferId(buffer);\n>>  \n>>  \t/* Ensure we have this buffer in the stream, and it is marked external. */\n>> -\tASSERT(id != -1 && (id & ipa::rpi::MaskExternalBuffer));\n>> +\tASSERT(id != -1 && (id & ipa::RPi::MaskExternalBuffer));\n>>  \tbufferMap_.erase(id);\n>>  }\n>>  \n>> diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n>> index 701110d04bdb..f1ac715f4221 100644\n>> --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n>> +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h\n>> @@ -32,13 +32,13 @@ class Stream : public libcamera::Stream\n>>  {\n>>  public:\n>>  \tStream()\n>> -\t\t: id_(ipa::rpi::MaskID)\n>> +\t\t: id_(ipa::RPi::MaskID)\n>>  \t{\n>>  \t}\n>>  \n>>  \tStream(const char *name, MediaEntity *dev, bool importOnly = false)\n>>  \t\t: external_(false), importOnly_(importOnly), name_(name),\n>> -\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(ipa::rpi::MaskID)\n>> +\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(ipa::RPi::MaskID)\n>>  \t{\n>>  \t}\n>>  \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> _______________________________________________\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 A666ABD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Feb 2021 11:11:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12189680A7;\n\tThu, 18 Feb 2021 12:11:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 185FB637DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Feb 2021 12:11:46 +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 6E28A3E7;\n\tThu, 18 Feb 2021 12:11:45 +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=\"H4o/QwR0\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613646705;\n\tbh=Rvg6mZN3Ap53l9dYLNv2NlQLE4F7oheIBKVug7Y+8co=;\n\th=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=H4o/QwR0mpCAG8kqxyIGMnXhy6u5Rp9+fuCETkwo0R6/qhsTfTT7MamWcEwY3/q8r\n\twGncyRgJ/3Nnr4z/7kKacURJm42IcpsJJMRDL7YCZxEveQvtc8+w2nGBwLIUIGnO/l\n\tf+VrVVNGE3TROplORAajESjNShBqgXi6GQaJUORQ=","To":"paul.elder@ideasonboard.com, Naushir Patuck <naush@raspberrypi.com>","References":"<20210217100852.1542397-1-naush@raspberrypi.com>\n\t<20210217100852.1542397-2-naush@raspberrypi.com>\n\t<20210217102449.GI17707@pyrite.rasen.tech>","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\tCyJXZAAKCRChHkZyEKRh/f8dEACTDsbLN2nioNZMwyLuQRUAFcXNolDX48xcUXsWS2QjxaPm\n\tVsJx8Uy8aYkS85mdPBh0C83OovQR/OVbr8AxhGvYqBs3nQvbWuTl/+4od7DfK2VZOoKBAu5S\n\tQK2FYuUcikDqYcFWJ8DQnubxfE8dvzojHEkXw0sA4igINHDDFX3HJGZtLio+WpEFQtCbfTAG\n\tYZslasz1YZRbwEdSsmO3/kqy5eMnczlm8a21A3fKUo3g8oAZEFM+f4DUNzqIltg31OAB/kZS\n\tenKZQ/SWC8PmLg/ZXBrReYakxXtkP6w3FwMlzOlhGxqhIRNiAJfXJBaRhuUWzPOpEDE9q5YJ\n\tBmqQL2WJm1VSNNVxbXJHpaWMH1sA2R00vmvRrPXGwyIO0IPYeUYQa3gsy6k+En/aMQJd27dp\n\taScf9am9PFICPY5T4ppneeJLif2lyLojo0mcHOV+uyrds9XkLpp14GfTkeKPdPMrLLTsHRfH\n\tfA4I4OBpRrEPiGIZB/0im98MkGY/Mu6qxeZmYLCcgD6qz4idOvfgVOrNh+aA8HzIVR+RMW8H\n\tQGBN9f0E3kfwxuhl3omo6V7lDw8XOdmuWZNC9zPq1UfryVHANYbLGz9KJ4Aw6M+OgBC2JpkD\n\thXMdHUkC+d20dwXrwHTlrJi1YNp6rBc+xald3wsUPOZ5z8moTHUX/uPA/qhGsbkCDQRWBP1m\n\tARAAzijkb+Sau4hAncr1JjOY+KyFEdUNxRy+hqTJdJfaYihxyaj0Ee0P0zEi35CbE6lgU0Uz\n\ttih9fiUbSV3wfsWqg1Ut3/5rTKu7kLFp15kF7eqvV4uezXRD3Qu4yjv/rMmEJbbD4cTvGCYI\n\td6MDC417f7vK3hCbCVIZSp3GXxyC1LU+UQr3fFcOyCwmP9vDUR9JV0BSqHHxRDdpUXE26Dk6\n\tmhf0V1YkspE5St814ETXpEus2urZE5yJIUROlWPIL+hm3NEWfAP06vsQUyLvr/GtbOT79vXl\n\tEn1aulcYyu20dRRxhkQ6iILaURcxIAVJJKPi8dsoMnS8pB0QW12AHWuirPF0g6DiuUfPmrA5\n\tPKe56IGlpkjc8cO51lIxHkWTpCMWigRdPDexKX+Sb+W9QWK/0JjIc4t3KBaiG8O4yRX8ml2R\n\t+rxfAVKM6V769P/hWoRGdgUMgYHFpHGSgEt80OKK5HeUPy2cngDUXzwrqiM5Sz6Od0qw5pCk\n\tNlXqI0W/who0iSVM+8+RmyY0OEkxEcci7rRLsGnM15B5PjLJjh1f2ULYkv8s4SnDwMZ/kE04\n\t/UqCMK/KnX8pwXEMCjz0h6qWNpGwJ0/tYIgQJZh6bqkvBrDogAvuhf60Sogw+mH8b+PBlx1L\n\toeTK396wc+4c3BfiC6pNtUS5GpsPMMjYMk7kVvEAEQEAAYkCPAQYAQoAJgIbDBYhBJAt15g/\n\tvSj943LUeqEeRnIQpGH9BQJdizzIBQkLSKZiAAoJEKEeRnIQpGH9eYgQAJpjaWNgqNOnMTmD\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":"<79e509c8-eaa7-29d7-4130-d43ff5530846@ideasonboard.com>","Date":"Thu, 18 Feb 2021 11:11:42 +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":"<20210217102449.GI17707@pyrite.rasen.tech>","Content-Language":"en-GB","Subject":"Re: [libcamera-devel] [PATCH 2/3] pipeline: ipa: raspberrypi:\n\tRename IPA Interface namespace to ipa::RPi","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@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>"}}]