From patchwork Mon Dec 4 00:10:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 19267 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 75BF1C32BC for ; Mon, 4 Dec 2023 00:10:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6969F629DB; Mon, 4 Dec 2023 01:10:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1701648649; bh=Kp5Os7saySrxWS5dhphg6mg+/T0P0d0hWZqdPlc1kVw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=rE1oFNBITicOLqrPZaRF2GmaSJeCmLqbNYAFPIyVlNOE0V9EbT2H1eXCes6ZVY7kf 9T/YFjWwzMrDbRcRVMo+IGteINMjZTHiYLNqjd+8kTRLRrxC/4dbdpPTVTs4wRklVg A0oZ2bgjrDctIM9jziYuwuZbVPefinHCcvuUlQtBzmt1bK/kOhPyTMu/nWFOY1DNpm UEY7Ov5jTFcHIMl8cAKYao8DooATGbfFaVlPfZGacekOKe5BRP+ZqHT+UU2orriLos 6ip7oG/emVJn9OaVyk4ICdDu3Xy/keY3oaHL3052POks84zr+ZPzLm9HgUZ/du9ebJ B1aJE3zF+CKLA== Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6938C629CE for ; Mon, 4 Dec 2023 01:10:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="lCGkwUS4"; dkim-atps=neutral Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40c07ed92fdso10505445e9.3 for ; Sun, 03 Dec 2023 16:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701648648; x=1702253448; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KQDxGYxBvF+f14bMPWP5VTUP7nmNuM1+782hhR4rrGo=; b=lCGkwUS4g9UfjuRb91eNgCgwlBodZj3ESQp9tBJeb/dD+gDlUdZ+cQzVEsr/sqTJRJ tdyJqjoZ29xGNRm40ANf2ku/YDR1iY1cjcAp9x9XujcQWchOI4QOeCMigRH9z/6XmDFs yJQa8bPGRWZOsEqqdC7N1T4trcMresdGIu3Ux3/dDTjgyK6uHR53+cLJ4qauaV3Ac2Ob szs+Vziy065QiY8gG5+RJGCiG7gwpcqV05WXHdxra2ucCV09w5HuRevLkEr8hzUBaYjv X1gz8qkuL2Wjm1Q98aoBNoFlBybgjK7N6OUiXhz/sQOQ/DDww9cZlYmuBBG6UoR79lkU AGfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701648648; x=1702253448; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KQDxGYxBvF+f14bMPWP5VTUP7nmNuM1+782hhR4rrGo=; b=t/gyMoW0MhcwmJWbsVrEHg1QIwJ6d3NU46j8st/SObAs+7fMr8sDSycDJi8IQUClGw Z0LmUqFdwNrOhcGqBRTm0vNHwawg65plCTVTxxVU5Zou9wmz2KJS275LPx9mAN07aE6H slDF7/rFXHtwvgQHlVyunE/HHrTXehYzYIWECKUHqy1cZ3VN/7AJCpmItN25HRsbzVMF +52Mbbia74zqMT515OPbZlJLejOEAPjhgCvYF1fnLig04k7l4wxiKra45STGbF3Zgb/g P71x1nP1UNaG2Be2QYCXHJYOLB352VXUcQc2K50/lEGMfnpYMjkuQ+yCEJ8r6oLpji42 hBtw== X-Gm-Message-State: AOJu0YwJTC7spNXGJhpA752tc219LblixtQquI4VgfvEb23LDJKkZ5BB 69mH8/zysj75znQTTiC7LSBUXgdmbjoRSnr6QMA= X-Google-Smtp-Source: AGHT+IFHqTGXO96FaS0N29uJYsWqohsKa0W83GkywXS5XrEtlhCM4F+meZ8CzbczgmotlPMgbJz6iw== X-Received: by 2002:a05:600c:3422:b0:40b:5e59:b7d5 with SMTP id y34-20020a05600c342200b0040b5e59b7d5mr2114673wmp.178.1701648648200; Sun, 03 Dec 2023 16:10:48 -0800 (PST) Received: from Lat-5310.. ([87.116.165.212]) by smtp.gmail.com with ESMTPSA id u29-20020adfa19d000000b003332db7d91dsm8835997wru.39.2023.12.03.16.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 16:10:48 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Mon, 4 Dec 2023 03:10:11 +0300 Message-Id: <20231204001013.404720-6-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231204001013.404720-1-andrey.konovalov@linaro.org> References: <20231204001013.404720-1-andrey.konovalov@linaro.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 5/7] libcamera: software_isp: introduce getStatsFD() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrey Konovalov via libcamera-devel From: Andrey Konovalov Reply-To: Andrey Konovalov Cc: mripard@redhat.com, g.martti@gmail.com, t.langendam@gmail.com, srinivas.kandagatla@linaro.org, bryan.odonoghue@linaro.org, admin@dennisbonke.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The shared memory for passing the statistics to the Soft IPA is allocated inside the Soft ISP. The FD of this memory needs to be passed to the IPA. Signed-off-by: Andrey Konovalov --- include/libcamera/internal/software_isp.h | 4 ++++ include/libcamera/internal/software_isp/swisp_linaro.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/libcamera/internal/software_isp.h b/include/libcamera/internal/software_isp.h index 556203d9..2ce3c68a 100644 --- a/include/libcamera/internal/software_isp.h +++ b/include/libcamera/internal/software_isp.h @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -53,6 +54,9 @@ public: virtual int queueBuffers(FrameBuffer *input, const std::map &outputs) = 0; + /* A hack to pass the FD from Soft ISP to Soft IPA */ + virtual const SharedFD &getStatsFD() = 0; + Signal inputBufferReady; Signal outputBufferReady; diff --git a/include/libcamera/internal/software_isp/swisp_linaro.h b/include/libcamera/internal/software_isp/swisp_linaro.h index 0d8a31a6..157898a8 100644 --- a/include/libcamera/internal/software_isp/swisp_linaro.h +++ b/include/libcamera/internal/software_isp/swisp_linaro.h @@ -44,6 +44,8 @@ public: int queueBuffers(FrameBuffer *input, const std::map &outputs); + const SharedFD &getStatsFD() { return sharedStats_.fd(); } + void process(FrameBuffer *input, FrameBuffer *output); private: