Patch Detail
Show a patch.
GET /api/patches/8710/?format=api
{ "id": 8710, "url": "https://patchwork.libcamera.org/api/patches/8710/?format=api", "web_url": "https://patchwork.libcamera.org/patch/8710/", "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": "<20200709084128.5316-20-jacopo@jmondi.org>", "date": "2020-07-09T08:41:27", "name": "[libcamera-devel,v2,19/20] lbcamera: ipu3: Configure ImgU with the computed parameters", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4145f2f3b12efdba047af400318ce0b3124e378d", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": { "id": 15, "url": "https://patchwork.libcamera.org/api/users/15/?format=api", "username": "jmondi", "first_name": "Jacopo", "last_name": "Mondi", "email": "jacopo@jmondi.org" }, "mbox": "https://patchwork.libcamera.org/patch/8710/mbox/", "series": [ { "id": 1091, "url": "https://patchwork.libcamera.org/api/series/1091/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1091", "date": "2020-07-09T08:41:08", "name": "libcamera: ipu3: Rework configuration", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1091/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/8710/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/8710/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 0E2F3BD790\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 9 Jul 2020 08:38:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DEAED611BA;\n\tThu, 9 Jul 2020 10:38:25 +0200 (CEST)", "from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 897E5611A2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 9 Jul 2020 10:38:22 +0200 (CEST)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id B91F2100002;\n\tThu, 9 Jul 2020 08:38:21 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 9 Jul 2020 10:41:27 +0200", "Message-Id": "<20200709084128.5316-20-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200709084128.5316-1-jacopo@jmondi.org>", "References": "<20200709084128.5316-1-jacopo@jmondi.org>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 19/20] lbcamera: ipu3: Configure ImgU\n\twith the computed parameters", "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=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Instrument the ImgUDevice::configureInput() function to use the provided\npipe configuration parameters to configure the IF, BDS and GDC\nrectangles.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/ipu3/imgu. | 0\n src/libcamera/pipeline/ipu3/imgu.cpp | 35 ++++++++++++++++------------\n src/libcamera/pipeline/ipu3/imgu.h | 2 +-\n src/libcamera/pipeline/ipu3/ipu3.cpp | 3 ++-\n 4 files changed, 23 insertions(+), 17 deletions(-)\n create mode 100644 src/libcamera/pipeline/ipu3/imgu.", "diff": "diff --git a/src/libcamera/pipeline/ipu3/imgu. b/src/libcamera/pipeline/ipu3/imgu.\nnew file mode 100644\nindex 000000000000..e69de29bb2d1\ndiff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\nindex d1addb7d84d1..69bcc4f30962 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.cpp\n+++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n@@ -441,11 +441,11 @@ ImgUDevice::PipeConfig ImgUDevice::calculatePipeConfig(Pipe *pipe)\n \n /**\n * \\brief Configure the ImgU unit input\n- * \\param[in] size The ImgU input frame size\n+ * \\param[in] config The ImgU pipe configuration parameters\n * \\param[in] inputFormat The format to be applied to ImgU input\n * \\return 0 on success or a negative error code otherwise\n */\n-int ImgUDevice::configureInput(const Size &size,\n+int ImgUDevice::configureInput(const PipeConfig &pipeConfig,\n \t\t\t V4L2DeviceFormat *inputFormat)\n {\n \t/* Configure the ImgU input video device with the requested sizes. */\n@@ -465,32 +465,37 @@ int ImgUDevice::configureInput(const Size &size,\n \t * to configure the crop/compose rectangles, contradicting the\n \t * V4L2 specification.\n \t */\n-\tRectangle rect = {\n+\tRectangle iif = {\n \t\t.x = 0,\n \t\t.y = 0,\n-\t\t.width = inputFormat->size.width,\n-\t\t.height = inputFormat->size.height,\n+\t\t.width = pipeConfig.iif.width,\n+\t\t.height = pipeConfig.iif.height,\n \t};\n-\tret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_CROP, &rect);\n+\tret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_CROP, &iif);\n \tif (ret)\n \t\treturn ret;\n+\tLOG(IPU3, Debug) << \"ImgU input feeder rectangle = \" << iif.toString();\n \n-\tret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_COMPOSE, &rect);\n+\tRectangle bds = {\n+\t\t.x = 0,\n+\t\t.y = 0,\n+\t\t.width = pipeConfig.bds.width,\n+\t\t.height = pipeConfig.bds.height,\n+\t};\n+\tret = imgu_->setSelection(PAD_INPUT, V4L2_SEL_TGT_COMPOSE, &bds);\n \tif (ret)\n \t\treturn ret;\n+\tLOG(IPU3, Debug) << \"ImgU BDS rectangle = \" << bds.toString();\n \n-\tLOG(IPU3, Debug) << \"ImgU input feeder and BDS rectangle = \"\n-\t\t\t << rect.toString();\n-\n-\tV4L2SubdeviceFormat imguFormat = {};\n-\timguFormat.mbus_code = MEDIA_BUS_FMT_FIXED;\n-\timguFormat.size = size;\n+\tV4L2SubdeviceFormat gdcFormat = {};\n+\tgdcFormat.mbus_code = MEDIA_BUS_FMT_FIXED;\n+\tgdcFormat.size = pipeConfig.gdc;\n \n-\tret = imgu_->setFormat(PAD_INPUT, &imguFormat);\n+\tret = imgu_->setFormat(PAD_INPUT, &gdcFormat);\n \tif (ret)\n \t\treturn ret;\n \n-\tLOG(IPU3, Debug) << \"ImgU GDC format = \" << imguFormat.toString();\n+\tLOG(IPU3, Debug) << \"ImgU GDC format = \" << gdcFormat.toString();\n \n \treturn 0;\n }\ndiff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h\nindex 15ee9a7f5698..6193c84bf35d 100644\n--- a/src/libcamera/pipeline/ipu3/imgu.h\n+++ b/src/libcamera/pipeline/ipu3/imgu.h\n@@ -45,7 +45,7 @@ public:\n \n \tPipeConfig calculatePipeConfig(Pipe *pipe);\n \n-\tint configureInput(const Size &size, V4L2DeviceFormat *inputFormat);\n+\tint configureInput(const PipeConfig &pipeConfig, V4L2DeviceFormat *inputFormat);\n \n \tint configureOutput(const StreamConfiguration &cfg,\n \t\t\t V4L2DeviceFormat *outputFormat)\ndiff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex 72261d16e9f8..d33aa7aee5e5 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -66,6 +66,7 @@ public:\n \tStatus validate() override;\n \n \tconst StreamConfiguration &cio2Format() const { return cio2Configuration_; };\n+\tconst ImgUDevice::PipeConfig imguConfig() const { return pipeConfig_; }\n \n private:\n \tIPU3CameraData *data_;\n@@ -444,7 +445,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)\n \tif (ret)\n \t\treturn ret;\n \n-\tret = imgu->configureInput(sensorSize, &cio2Format);\n+\tret = imgu->configureInput(config->imguConfig(), &cio2Format);\n \tif (ret)\n \t\treturn ret;\n \n", "prefixes": [ "libcamera-devel", "v2", "19/20" ] }