Patch Detail
Show a patch.
GET /api/patches/9807/?format=api
{ "id": 9807, "url": "https://patchwork.libcamera.org/api/patches/9807/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9807/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200925014207.1455796-10-niklas.soderlund@ragnatech.se>", "date": "2020-09-25T01:41:54", "name": "[libcamera-devel,v3,09/22] libcamera: pipeline: rkisp1: Prefix main path video and resizer", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "55eeca94418d09152bd1286adde102727322b030", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9807/mbox/", "series": [ { "id": 1325, "url": "https://patchwork.libcamera.org/api/series/1325/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1325", "date": "2020-09-25T01:41:45", "name": "libcamera: pipeline: rkisp1: Extend to support two streams", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1325/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9807/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9807/checks/", "tags": {}, "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 A24C7C3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Sep 2020 01:42:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5FCAE63032;\n\tFri, 25 Sep 2020 03:42:52 +0200 (CEST)", "from bin-mail-out-05.binero.net (bin-mail-out-05.binero.net\n\t[195.74.38.228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 68D386300B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Sep 2020 03:42:48 +0200 (CEST)", "from bismarck.berto.se (p54ac52a8.dip0.t-ipconnect.de\n\t[84.172.82.168]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 6996bff3-fed0-11ea-92dc-005056917a89;\n\tFri, 25 Sep 2020 03:42:46 +0200 (CEST)" ], "X-Halon-ID": "6996bff3-fed0-11ea-92dc-005056917a89", "Authorized-sender": "niklas.soderlund@fsdn.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 25 Sep 2020 03:41:54 +0200", "Message-Id": "<20200925014207.1455796-10-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20200925014207.1455796-1-niklas.soderlund@ragnatech.se>", "References": "<20200925014207.1455796-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3 09/22] libcamera: pipeline: rkisp1:\n\tPrefix main path video and resizer", "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>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "In preparation of supporting both the main and self path prefix the main\npath specific variables with mainPath.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 80 ++++++++++++------------\n 1 file changed, 40 insertions(+), 40 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 2f70bf2220fa5c84..a810e218133e1990 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -68,7 +68,7 @@ struct RkISP1FrameInfo {\n \n \tFrameBuffer *paramBuffer;\n \tFrameBuffer *statBuffer;\n-\tFrameBuffer *videoBuffer;\n+\tFrameBuffer *mainPathBuffer;\n \n \tbool paramFilled;\n \tbool paramDequeued;\n@@ -133,7 +133,7 @@ class RkISP1CameraData : public CameraData\n public:\n \tRkISP1CameraData(PipelineHandler *pipe, V4L2VideoDevice *video)\n \t\t: CameraData(pipe), sensor_(nullptr), frame_(0),\n-\t\t frameInfo_(pipe), video_(video)\n+\t\t frameInfo_(pipe), mainPathVideo_(video)\n \t{\n \t}\n \n@@ -144,14 +144,14 @@ public:\n \n \tint loadIPA();\n \n-\tStream stream_;\n+\tStream mainPathStream_;\n \tCameraSensor *sensor_;\n \tunsigned int frame_;\n \tstd::vector<IPABuffer> ipaBuffers_;\n \tRkISP1Frames frameInfo_;\n \tRkISP1Timeline timeline_;\n \n-\tV4L2VideoDevice *video_;\n+\tV4L2VideoDevice *mainPathVideo_;\n \n private:\n \tvoid queueFrameAction(unsigned int frame,\n@@ -227,8 +227,8 @@ private:\n \n \tMediaDevice *media_;\n \tV4L2Subdevice *isp_;\n-\tV4L2Subdevice *resizer_;\n-\tV4L2VideoDevice *video_;\n+\tV4L2Subdevice *mainPathResizer_;\n+\tV4L2VideoDevice *mainPathVideo_;\n \tV4L2VideoDevice *param_;\n \tV4L2VideoDevice *stat_;\n \n@@ -261,7 +261,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n \t}\n \tFrameBuffer *statBuffer = pipe_->availableStatBuffers_.front();\n \n-\tFrameBuffer *videoBuffer = request->findBuffer(&data->stream_);\n+\tFrameBuffer *mainPathBuffer = request->findBuffer(&data->mainPathStream_);\n \n \tpipe_->availableParamBuffers_.pop();\n \tpipe_->availableStatBuffers_.pop();\n@@ -271,7 +271,7 @@ RkISP1FrameInfo *RkISP1Frames::create(const RkISP1CameraData *data, Request *req\n \tinfo->frame = frame;\n \tinfo->request = request;\n \tinfo->paramBuffer = paramBuffer;\n-\tinfo->videoBuffer = videoBuffer;\n+\tinfo->mainPathBuffer = mainPathBuffer;\n \tinfo->statBuffer = statBuffer;\n \tinfo->paramFilled = false;\n \tinfo->paramDequeued = false;\n@@ -330,7 +330,7 @@ RkISP1FrameInfo *RkISP1Frames::find(FrameBuffer *buffer)\n \n \t\tif (info->paramBuffer == buffer ||\n \t\t info->statBuffer == buffer ||\n-\t\t info->videoBuffer == buffer)\n+\t\t info->mainPathBuffer == buffer)\n \t\t\treturn info;\n \t}\n \n@@ -402,7 +402,7 @@ protected:\n \n \t\tpipe_->param_->queueBuffer(info->paramBuffer);\n \t\tpipe_->stat_->queueBuffer(info->statBuffer);\n-\t\tpipe_->video_->queueBuffer(info->videoBuffer);\n+\t\tpipe_->mainPathVideo_->queueBuffer(info->mainPathBuffer);\n \t}\n \n private:\n@@ -541,10 +541,10 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \tcfg.bufferCount = RKISP1_BUFFER_COUNT;\n \n \tV4L2DeviceFormat format = {};\n-\tformat.fourcc = data_->video_->toV4L2PixelFormat(cfg.pixelFormat);\n+\tformat.fourcc = data_->mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n \tformat.size = cfg.size;\n \n-\tint ret = data_->video_->tryFormat(&format);\n+\tint ret = data_->mainPathVideo_->tryFormat(&format);\n \tif (ret)\n \t\treturn Invalid;\n \n@@ -555,8 +555,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n }\n \n PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)\n-\t: PipelineHandler(manager), isp_(nullptr), resizer_(nullptr),\n-\t video_(nullptr), param_(nullptr), stat_(nullptr)\n+\t: PipelineHandler(manager), isp_(nullptr), mainPathResizer_(nullptr),\n+\t mainPathVideo_(nullptr), param_(nullptr), stat_(nullptr)\n {\n }\n \n@@ -564,8 +564,8 @@ PipelineHandlerRkISP1::~PipelineHandlerRkISP1()\n {\n \tdelete param_;\n \tdelete stat_;\n-\tdelete video_;\n-\tdelete resizer_;\n+\tdelete mainPathVideo_;\n+\tdelete mainPathResizer_;\n \tdelete isp_;\n }\n \n@@ -646,7 +646,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tLOG(RkISP1, Debug) << \"ISP output pad configured with \" << format.toString();\n \n-\tret = resizer_->setFormat(0, &format);\n+\tret = mainPathResizer_->setFormat(0, &format);\n \tif (ret < 0)\n \t\treturn ret;\n \n@@ -656,7 +656,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tLOG(RkISP1, Debug) << \"Configuring resizer output pad with \" << format.toString();\n \n-\tret = resizer_->setFormat(1, &format);\n+\tret = mainPathResizer_->setFormat(1, &format);\n \tif (ret < 0)\n \t\treturn ret;\n \n@@ -664,16 +664,16 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \n \tconst PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat);\n \tV4L2DeviceFormat outputFormat = {};\n-\toutputFormat.fourcc = video_->toV4L2PixelFormat(cfg.pixelFormat);\n+\toutputFormat.fourcc = mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat);\n \toutputFormat.size = cfg.size;\n \toutputFormat.planesCount = info.numPlanes();\n \n-\tret = video_->setFormat(&outputFormat);\n+\tret = mainPathVideo_->setFormat(&outputFormat);\n \tif (ret)\n \t\treturn ret;\n \n \tif (outputFormat.size != cfg.size ||\n-\t outputFormat.fourcc != video_->toV4L2PixelFormat(cfg.pixelFormat)) {\n+\t outputFormat.fourcc != mainPathVideo_->toV4L2PixelFormat(cfg.pixelFormat)) {\n \t\tLOG(RkISP1, Error)\n \t\t\t<< \"Unable to configure capture in \" << cfg.toString();\n \t\treturn -EINVAL;\n@@ -691,7 +691,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)\n \tif (ret)\n \t\treturn ret;\n \n-\tcfg.setStream(&data->stream_);\n+\tcfg.setStream(&data->mainPathStream_);\n \n \treturn 0;\n }\n@@ -700,17 +700,17 @@ int PipelineHandlerRkISP1::exportFrameBuffers([[maybe_unused]] Camera *camera, S\n \t\t\t\t\t std::vector<std::unique_ptr<FrameBuffer>> *buffers)\n {\n \tunsigned int count = stream->configuration().bufferCount;\n-\treturn video_->exportBuffers(count, buffers);\n+\treturn mainPathVideo_->exportBuffers(count, buffers);\n }\n \n int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n {\n \tRkISP1CameraData *data = cameraData(camera);\n-\tunsigned int count = data->stream_.configuration().bufferCount;\n+\tunsigned int count = data->mainPathStream_.configuration().bufferCount;\n \tunsigned int ipaBufferId = 1;\n \tint ret;\n \n-\tret = video_->importBuffers(count);\n+\tret = mainPathVideo_->importBuffers(count);\n \tif (ret < 0)\n \t\tgoto error;\n \n@@ -743,7 +743,7 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n error:\n \tparamBuffers_.clear();\n \tstatBuffers_.clear();\n-\tvideo_->releaseBuffers();\n+\tmainPathVideo_->releaseBuffers();\n \n \treturn ret;\n }\n@@ -774,8 +774,8 @@ int PipelineHandlerRkISP1::freeBuffers(Camera *camera)\n \tif (stat_->releaseBuffers())\n \t\tLOG(RkISP1, Error) << \"Failed to release stat buffers\";\n \n-\tif (video_->releaseBuffers())\n-\t\tLOG(RkISP1, Error) << \"Failed to release video buffers\";\n+\tif (mainPathVideo_->releaseBuffers())\n+\t\tLOG(RkISP1, Error) << \"Failed to release main path buffers\";\n \n \treturn 0;\n }\n@@ -819,7 +819,7 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n \t\treturn ret;\n \t}\n \n-\tret = video_->streamOn();\n+\tret = mainPathVideo_->streamOn();\n \tif (ret) {\n \t\tparam_->streamOff();\n \t\tstat_->streamOff();\n@@ -844,8 +844,8 @@ int PipelineHandlerRkISP1::start(Camera *camera)\n \n \tstd::map<unsigned int, IPAStream> streamConfig;\n \tstreamConfig[0] = {\n-\t\t.pixelFormat = data->stream_.configuration().pixelFormat,\n-\t\t.size = data->stream_.configuration().size,\n+\t\t.pixelFormat = data->mainPathStream_.configuration().pixelFormat,\n+\t\t.size = data->mainPathStream_.configuration().size,\n \t};\n \n \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n@@ -863,7 +863,7 @@ void PipelineHandlerRkISP1::stop(Camera *camera)\n \tRkISP1CameraData *data = cameraData(camera);\n \tint ret;\n \n-\tret = video_->streamOff();\n+\tret = mainPathVideo_->streamOff();\n \tif (ret)\n \t\tLOG(RkISP1, Warning)\n \t\t\t<< \"Failed to stop camera \" << camera->id();\n@@ -947,7 +947,7 @@ int PipelineHandlerRkISP1::initLinks(const Camera *camera,\n \t}\n \n \tfor (const StreamConfiguration &cfg : config) {\n-\t\tif (cfg.stream() != &data->stream_)\n+\t\tif (cfg.stream() != &data->mainPathStream_)\n \t\t\treturn -EINVAL;\n \n \t\tMediaLink *link = media_->link(\"rkisp1_isp\", 2,\n@@ -968,7 +968,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \tint ret;\n \n \tstd::unique_ptr<RkISP1CameraData> data =\n-\t\tstd::make_unique<RkISP1CameraData>(this, video_);\n+\t\tstd::make_unique<RkISP1CameraData>(this, mainPathVideo_);\n \n \tControlInfoMap::Map ctrls;\n \tctrls.emplace(std::piecewise_construct,\n@@ -989,7 +989,7 @@ int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)\n \tif (ret)\n \t\treturn ret;\n \n-\tstd::set<Stream *> streams{ &data->stream_ };\n+\tstd::set<Stream *> streams{ &data->mainPathStream_ };\n \tstd::shared_ptr<Camera> camera =\n \t\tCamera::create(this, data->sensor_->id(), streams);\n \tregisterCamera(std::move(camera), std::move(data));\n@@ -1019,13 +1019,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \tif (isp_->open() < 0)\n \t\treturn false;\n \n-\tresizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n-\tif (resizer_->open() < 0)\n+\tmainPathResizer_ = V4L2Subdevice::fromEntityName(media_, \"rkisp1_resizer_mainpath\");\n+\tif (mainPathResizer_->open() < 0)\n \t\treturn false;\n \n \t/* Locate and open the capture video node. */\n-\tvideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n-\tif (video_->open() < 0)\n+\tmainPathVideo_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_mainpath\");\n+\tif (mainPathVideo_->open() < 0)\n \t\treturn false;\n \n \tstat_ = V4L2VideoDevice::fromEntityName(media_, \"rkisp1_stats\");\n@@ -1036,7 +1036,7 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)\n \tif (param_->open() < 0)\n \t\treturn false;\n \n-\tvideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n+\tmainPathVideo_->bufferReady.connect(this, &PipelineHandlerRkISP1::bufferReady);\n \tstat_->bufferReady.connect(this, &PipelineHandlerRkISP1::statReady);\n \tparam_->bufferReady.connect(this, &PipelineHandlerRkISP1::paramReady);\n \n", "prefixes": [ "libcamera-devel", "v3", "09/22" ] }