Patch Detail
Show a patch.
GET /api/patches/8490/?format=api
{ "id": 8490, "url": "https://patchwork.libcamera.org/api/patches/8490/?format=api", "web_url": "https://patchwork.libcamera.org/patch/8490/", "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": "<20200628231934.29025-7-laurent.pinchart@ideasonboard.com>", "date": "2020-06-28T23:19:31", "name": "[libcamera-devel,v1,6/9] ipa: raspberrypi: Pass lens shading table through configure() function", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7f4dbc8b9c457eeafc6767878c409f60e48b9616", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/8490/mbox/", "series": [ { "id": 1054, "url": "https://patchwork.libcamera.org/api/series/1054/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1054", "date": "2020-06-28T23:19:25", "name": "Support passing custom data to IPA configure()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1054/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/8490/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/8490/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 5B461C2E6A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Jun 2020 23:19:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 27AAF60B04;\n\tMon, 29 Jun 2020 01:19:52 +0200 (CEST)", "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 BC53960AF4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Jun 2020 01:19:43 +0200 (CEST)", "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 26D55556;\n\tMon, 29 Jun 2020 01:19:43 +0200 (CEST)" ], "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=\"v/93Sohh\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1593386383;\n\tbh=Vp9FTQVBMiDAnjh64KKZnhd3tF+Qg5c+daVZqibcvb4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=v/93SohhFTrMuKED7DBhlqejLHV2v9Zz1jhANiyXNspAy1woBpwHe5J6u4+XkZrki\n\tEyKM26uBvlcOH61Gx11P3s6cFMfUMTcRzAnhC320FVk4BxMQzp0HUEi/u55H2DaobR\n\tAF/tjUZiXo10KnSAUJfHGYBI9sOO+og8ynAHttck=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 29 Jun 2020 02:19:31 +0300", "Message-Id": "<20200628231934.29025-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200628231934.29025-1-laurent.pinchart@ideasonboard.com>", "References": "<20200628231934.29025-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v1 6/9] ipa: raspberrypi: Pass lens\n\tshading table through configure() function", "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": "The IPAInterface now accepts custom configuration data. Use it to pass\nthe lens shading table instead of using a custom IPA event. This will\nallow starting the IPA when starting the camera, instead of pre-starting\nit early in order to process the lens shading table allocation event.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/ipa/raspberrypi.h | 5 ++++-\n src/ipa/raspberrypi/raspberrypi.cpp | 12 ++++++------\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 10 ++++------\n 3 files changed, 14 insertions(+), 13 deletions(-)", "diff": "diff --git a/include/libcamera/ipa/raspberrypi.h b/include/libcamera/ipa/raspberrypi.h\nindex a18ce9a884b6..c335d0259549 100644\n--- a/include/libcamera/ipa/raspberrypi.h\n+++ b/include/libcamera/ipa/raspberrypi.h\n@@ -10,6 +10,10 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/controls.h>\n \n+enum RPiConfigParameters {\n+\tRPI_IPA_CONFIG_LSTABLE = (1 << 0),\n+};\n+\n enum RPiOperations {\n \tRPI_IPA_ACTION_V4L2_SET_STAGGERED = 1,\n \tRPI_IPA_ACTION_V4L2_SET_ISP,\n@@ -21,7 +25,6 @@ enum RPiOperations {\n \tRPI_IPA_EVENT_SIGNAL_STAT_READY,\n \tRPI_IPA_EVENT_SIGNAL_ISP_PREPARE,\n \tRPI_IPA_EVENT_QUEUE_REQUEST,\n-\tRPI_IPA_EVENT_LS_TABLE_ALLOCATION,\n };\n \n enum RPiIpaMask {\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 860be22ddb5d..c9f7dea375a5 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -277,6 +277,12 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,\n \t\tapplyAGC(&agcStatus);\n \n \tlastMode_ = mode_;\n+\n+\t/* Store the lens shading table pointer and handle if available. */\n+\tif (ipaConfig.operation & RPI_IPA_CONFIG_LSTABLE) {\n+\t\tlsTable_ = reinterpret_cast<void *>(ipaConfig.data[0]);\n+\t\tlsTableHandle_ = ipaConfig.data[1];\n+\t}\n }\n \n void IPARPi::mapBuffers(const std::vector<IPABuffer> &buffers)\n@@ -358,12 +364,6 @@ void IPARPi::processEvent(const IPAOperationData &event)\n \t\tbreak;\n \t}\n \n-\tcase RPI_IPA_EVENT_LS_TABLE_ALLOCATION: {\n-\t\tlsTable_ = reinterpret_cast<void *>(event.data[0]);\n-\t\tlsTableHandle_ = event.data[1];\n-\t\tbreak;\n-\t}\n-\n \tdefault:\n \t\tLOG(IPARPI, Error) << \"Unknown event \" << event.operation;\n \t\tbreak;\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 0f9237a7f346..903796790f44 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1109,6 +1109,7 @@ int RPiCameraData::configureIPA()\n {\n \tstd::map<unsigned int, IPAStream> streamConfig;\n \tstd::map<unsigned int, const ControlInfoMap &> entityControls;\n+\tIPAOperationData ipaConfig = {};\n \n \t/* Get the device format to pass to the IPA. */\n \tV4L2DeviceFormat sensorFormat;\n@@ -1138,11 +1139,9 @@ int RPiCameraData::configureIPA()\n \t\t * The vcsm allocation will always be in the memory region\n \t\t * < 32-bits to allow Videocore to access the memory.\n \t\t */\n-\t\tIPAOperationData op;\n-\t\top.operation = RPI_IPA_EVENT_LS_TABLE_ALLOCATION;\n-\t\top.data = { static_cast<uint32_t>(ptr & 0xffffffff),\n-\t\t\t vcsm_.getVCHandle(lsTable_) };\n-\t\tipa_->processEvent(op);\n+\t\tipaConfig.operation = RPI_IPA_CONFIG_LSTABLE;\n+\t\tipaConfig.data = { static_cast<uint32_t>(ptr & 0xffffffff),\n+\t\t\t\t vcsm_.getVCHandle(lsTable_) };\n \t}\n \n \tCameraSensorInfo sensorInfo = {};\n@@ -1153,7 +1152,6 @@ int RPiCameraData::configureIPA()\n \t}\n \n \t/* Ready the IPA - it must know about the sensor resolution. */\n-\tIPAOperationData ipaConfig;\n \tipa_->configure(sensorInfo, streamConfig, entityControls, ipaConfig,\n \t\t\tnullptr);\n \n", "prefixes": [ "libcamera-devel", "v1", "6/9" ] }