{"id":13363,"url":"https://patchwork.libcamera.org/api/patches/13363/?format=json","web_url":"https://patchwork.libcamera.org/patch/13363/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210816043138.957984-6-hiroh@chromium.org>","date":"2021-08-16T04:31:33","name":"[libcamera-devel,RFC,05/10] ipa: rkisp1: Use offset in mapping IPABuffer","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c47ad77a7019ca69f05a2779f7bcbea9796201b9","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/?format=json","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/13363/mbox/","series":[{"id":2359,"url":"https://patchwork.libcamera.org/api/series/2359/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2359","date":"2021-08-16T04:31:28","name":"Add offset to FrameBuffer::Plane","version":1,"mbox":"https://patchwork.libcamera.org/series/2359/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/13363/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/13363/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 0865EC3241\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 16 Aug 2021 04:31:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BE2806888C;\n\tMon, 16 Aug 2021 06:31:56 +0200 (CEST)","from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com\n\t[IPv6:2607:f8b0:4864:20::1034])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 26C5F6888C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Aug 2021 06:31:55 +0200 (CEST)","by mail-pj1-x1034.google.com with SMTP id\n\tj12-20020a17090aeb0c00b00179530520b3so9957438pjz.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Aug 2021 21:31:55 -0700 (PDT)","from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:203:6f5f:1479:a6ab:4229])\n\tby smtp.gmail.com with ESMTPSA id\n\tu10sm2767417pgj.48.2021.08.15.21.31.52\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 15 Aug 2021 21:31:53 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Me7+xVkU\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=fE1vSWJEgZ6nlMPNgdHPWSi5Hp9OUVVHMgM8F+zZWPs=;\n\tb=Me7+xVkUe3b9qvmByrsnzJQPy6N0Bb/v9GMATEEGumulMclHhKBKicxdrgwLG0ULJG\n\tuEOdYmNXWcFjoTS9k+4vpZVfHsFZa6NyAoUgcXAxxgJ+IMMAVGoUkVs6LBIuUoElu+tn\n\t6QKt9AUmIAJoQHX6yq9+CmGZH9Ss/QDfNRsWQ=","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:mime-version:content-transfer-encoding;\n\tbh=fE1vSWJEgZ6nlMPNgdHPWSi5Hp9OUVVHMgM8F+zZWPs=;\n\tb=GsadBhlB1GoIXfQRJkVnxygnknzOrH8luSjmTFS2/Fu3xHz9T9I53Imfu29SWSEXTH\n\tLL9ZnQkPBpDrdPqpADCmg26S/VGd1/IC41ICr00NdNT7gPfs20dZ9rF0ZBIvbRMYz3Hc\n\tADqwGI3jVtYltmF0LEhdV0qoRDmzVIAOoyRAzhhYIf3yhzDz3DytyPuX9NBLXlqXCjff\n\tVhG7Lw3hrJGeoXV1lD1HvRxoBTBW297GtTNC3HuX5uaxGFy0iE1lIAcVH0pc235kpp+i\n\tMy/+CzzbA0m8PftEFo5neViUGSqelcOLJ9vDsL1YECpg/e94+++RIGCA7yeFaOYMaFm2\n\tzGIg==","X-Gm-Message-State":"AOAM532QcVTGDcOY7o5BB97dhXMbbxvTtVA56gGLOv/YGDyLbmw24uB/\n\tfe4sFINmPkzzDpgMPtYjEw/V3oIUbwnYSw==","X-Google-Smtp-Source":"ABdhPJwmSW3Sq62mC1RogThotuMh4eQD/A7KPegPA+QR/5XQxNlJgBAETkyaZch6MRN3oqYRjtVNjQ==","X-Received":"by 2002:a17:90a:f10:: with SMTP id\n\t16mr14955777pjy.80.1629088313532; \n\tSun, 15 Aug 2021 21:31:53 -0700 (PDT)","From":"Hirokazu Honda <hiroh@chromium.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 16 Aug 2021 13:31:33 +0900","Message-Id":"<20210816043138.957984-6-hiroh@chromium.org>","X-Mailer":"git-send-email 2.33.0.rc1.237.g0d66db33f3-goog","In-Reply-To":"<20210816043138.957984-1-hiroh@chromium.org>","References":"<20210816043138.957984-1-hiroh@chromium.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [RFC PATCH 05/10] ipa: rkisp1: Use offset in\n\tmapping IPABuffer","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"IPABuffer is represented by FrameBuffer. FrameBuffer::Plane has\nnow an offset. This uses the offset variable to map the IPABuffer.\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/ipa/rkisp1/rkisp1.cpp | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 06fb9640..eb7a2705 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -165,7 +165,7 @@ void IPARkISP1::mapBuffers(const std::vector<IPABuffer> &buffers)\n \t\t * to applications).\n \t\t */\n \t\tbuffersMemory_[buffer.id] = mmap(NULL,\n-\t\t\t\t\t\t fb.planes()[0].length,\n+\t\t\t\t\t\t fb.planes()[0].offset + fb.planes()[0].length,\n \t\t\t\t\t\t PROT_READ | PROT_WRITE,\n \t\t\t\t\t\t MAP_SHARED,\n \t\t\t\t\t\t fb.planes()[0].fd.fd(),\n@@ -186,7 +186,7 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids)\n \t\tif (fb == buffers_.end())\n \t\t\tcontinue;\n \n-\t\tmunmap(buffersMemory_[id], fb->second.planes()[0].length);\n+\t\tmunmap(buffersMemory_[id], fb->second.planes()[0].offset + fb->second.planes()[0].length);\n \t\tbuffersMemory_.erase(id);\n \t\tbuffers_.erase(id);\n \t}\n","prefixes":["libcamera-devel","RFC","05/10"]}