Patch Detail
Show a patch.
GET /api/patches/3151/?format=api
{ "id": 3151, "url": "https://patchwork.libcamera.org/api/patches/3151/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3151/", "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": "<20200318001009.32512-6-kgupta@es.iitr.ac.in>", "date": "2020-03-18T00:10:08", "name": "[libcamera-devel,v2,5/6] libcamera: ipa_manager: replace by utils functions", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "19406734ddde5618324aa717db103d3ee58d9297", "submitter": { "id": 39, "url": "https://patchwork.libcamera.org/api/people/39/?format=api", "name": "Kaaira Gupta", "email": "kgupta@es.iitr.ac.in" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3151/mbox/", "series": [ { "id": 729, "url": "https://patchwork.libcamera.org/api/series/729/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=729", "date": "2020-03-18T00:10:03", "name": "libcamera: determine IPA_PROXY_PATH at runtime", "version": 2, "mbox": "https://patchwork.libcamera.org/series/729/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3151/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3151/checks/", "tags": {}, "headers": { "Return-Path": "<kgupta@es.iitr.ac.in>", "Received": [ "from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com\n\t[IPv6:2607:f8b0:4864:20::102e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 946D760422\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Mar 2020 01:10:50 +0100 (CET)", "by mail-pj1-x102e.google.com with SMTP id nu11so461857pjb.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Mar 2020 17:10:50 -0700 (PDT)", "from kaaira-HP-Pavilion-Notebook ([103.113.213.153])\n\tby smtp.gmail.com with ESMTPSA id\n\tw205sm4318658pfc.75.2020.03.17.17.10.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Mar 2020 17:10:48 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=9ua74D+pawbGOHEp2jkPTCrGO8MCR0QT8xKXKQ8HvG0=;\n\tb=LYLnbya1xX1x1ggDavhU4Gu2iookTyUdcQMMKnU3CvCNF0ymrCzGOfouQLAUgNX85G\n\t32V/Zoa6RhIrwWXx3F39CbQVFkQTni5MRWkvzbArq9wiI2uZG9CTVjjz4A1Y8bQCwPMl\n\ttbwcf01W80Sm38a2f8NzGcRE7HRYs7fieKHqYfjx3vN646Q/8uD/mkDglc42GkR/Zrzb\n\tpCY97qRpW5Ha9Cbng5U6nwa6qC5oUR2KExRCJIPSgZp5iiBEotoAUTQwOtFWEz5x9hZW\n\t+iAqj36PXtiHal4sM1Hy+YEdq/YMZf7H+sIY9P/Wb554DdRP4NDiFpc16N7oBvXGWyau\n\thpeA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=9ua74D+pawbGOHEp2jkPTCrGO8MCR0QT8xKXKQ8HvG0=;\n\tb=lfZx046UbP0gkPOXnjjjJLpr3kTAOE5V0dLFNTpm45OI/cSuOE++GCy0QiUTsuG3J3\n\tXx/zlefkKeHeIPTOhxP8wfOZ2ubJDabzuRN5MZCTflpoP1fRWajneEEL6zGq9sGUgl2w\n\ttbAOqHyenBfWB7qvRM2YmeUznIO8VLOksVLpcNDzurHHVfDYsCCsSe4UE9KKD6XMhML1\n\tjVg0/G6np9P07eojv+mffCavvWeDOTLWsQe7Yw/f3PMxb0cJ+BrQM4PtUN2DSAkeGy7g\n\tWUKENOSk6si1J3XhWOWrRk/29tlmRH82xu0f72lrvfRj1vUBoZ4nXLKW/jfNCMmgk9Tq\n\tuU2g==", "X-Gm-Message-State": "ANhLgQ2Oy/LIG61s7jHYwT3MIFlbgUP9Y5a6qWINvUgBJyLkxX3HPDWZ\n\t8aBqqDpKFcZGWceOAWLNfmlefQ==", "X-Google-Smtp-Source": "ADFU+vv9rRehpEy71JAeilQhuqyGQUhA5QD7G0Jgo1hQzBO1KEJyYbWrhY0/lQItFH2eJYAKas8/6w==", "X-Received": "by 2002:a17:902:7d8f:: with SMTP id\n\ta15mr1188851plm.175.1584490249109; \n\tTue, 17 Mar 2020 17:10:49 -0700 (PDT)", "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>", "To": "kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org,\n\tHelen Koike <helen.koike@collabora.com>,\n\tVaishali Thakkar <vthakkar@vaishalithakkar.in>", "Cc": "Kaaira Gupta <kgupta@es.iitr.ac.in>", "Date": "Wed, 18 Mar 2020 05:40:08 +0530", "Message-Id": "<20200318001009.32512-6-kgupta@es.iitr.ac.in>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>", "References": "<20200318001009.32512-1-kgupta@es.iitr.ac.in>", "Subject": "[libcamera-devel] [PATCH LIBCAMERA v2 5/6] libcamera: ipa_manager:\n\treplace by utils functions", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Wed, 18 Mar 2020 00:10:50 -0000" }, "content": "Now that functions isLibcameraInstalled() and libcameraPath() are\ndefined in utils, they don't need to be defined here again. Hence remove\nthem and replace them with utils' functions.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/libcamera/ipa_manager.cpp | 36 ++---------------------------------\n 1 file changed, 2 insertions(+), 34 deletions(-)", "diff": "diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 238433d..0bd280c 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -9,9 +9,6 @@\n \n #include <algorithm>\n #include <dirent.h>\n-#include <dlfcn.h>\n-#include <elf.h>\n-#include <link.h>\n #include <string.h>\n #include <sys/types.h>\n \n@@ -27,35 +24,6 @@\n * \\brief Image Processing Algorithm module manager\n */\n \n-static bool isLibcameraInstalled()\n-{\n-\t/* musl doesn't declare _DYNAMIC in link.h, declare it manually. */\n-\textern ElfW(Dyn) _DYNAMIC[];\n-\n-\t/*\n-\t * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n-\t * install.\n-\t */\n-\tfor (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n-\t\tif (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n-\t\t\treturn false;\n-\t}\n-\n-\treturn true;\n-}\n-\n-static std::string libcameraPath()\n-{\n-\tDl_info info;\n-\n-\t/* Look up our own symbol. */\n-\tint ret = dladdr(reinterpret_cast<void *>(libcameraPath), &info);\n-\tif (ret == 0)\n-\t\treturn nullptr;\n-\n-\treturn info.dli_fname;\n-}\n-\n namespace libcamera {\n \n LOG_DEFINE_CATEGORY(IPAManager)\n@@ -151,8 +119,8 @@ IPAManager::IPAManager()\n \t * path for the IPA from that point. We need to recurse one level of\n \t * sub-directories to match the build tree.\n \t */\n-\tif (!isLibcameraInstalled()) {\n-\t\tstd::string ipaBuildPath = utils::dirname(libcameraPath()) + \"/../ipa\";\n+\tif (!utils::isLibcameraInstalled()) {\n+\t\tstd::string ipaBuildPath = utils::dirname(utils::libcameraPath()) + \"/../ipa\";\n \t\tconstexpr int maxDepth = 1;\n \n \t\tLOG(IPAManager, Info)\n", "prefixes": [ "libcamera-devel", "v2", "5/6" ] }