From patchwork Fri May 14 07:58:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 12291 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 956E9C31F6 for ; Fri, 14 May 2021 07:58:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5645568924; Fri, 14 May 2021 09:58:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="r1PaeC2s"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DFBF68918 for ; Fri, 14 May 2021 09:58:35 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.50]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5841A9F0; Fri, 14 May 2021 09:58:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1620979115; bh=seWOaBpLQL1i3WCH38j5JUe585SNLe6tHvMpUy7VZQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r1PaeC2snTh1wvpBgoIDiwZSDwGEqTfUlzjUGgp4Y5Tlm6YM5tcRJG36Swu98iQcy woUfH9jWmMxSStu+BJMJWLrW1E0Z6jTMPWyjlFCU0OgVDjFVFliho4QI24y5TpEmuC ZIz0aixCrO7JV9jbeNcXzbqyUtKopKrEkaP/WvN4= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Fri, 14 May 2021 13:28:08 +0530 Message-Id: <20210514075808.282479-7-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210514075808.282479-1-umang.jain@ideasonboard.com> References: <20210514075808.282479-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 6/6] libcamera: pipeline: ipu3: Pass request metadata to IPA 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Kieran Bingham Pass the request metadata control list to the IPA when setting passing the statistics buffers, or after the raw buffer completion. This allows us to pass in the timestamp and other data from the request which will be used by the IPA. Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/ipu3/ipu3.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 5b15ca90..38f66919 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -1285,6 +1285,7 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer) ev.op = ipa::ipu3::EventFillParams; ev.frame = info->id; ev.bufferId = info->paramBuffer->cookie(); + ev.controls = request->metadata(); ipa_->processEvent(ev); } @@ -1314,6 +1315,8 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer) if (!info) return; + Request *request = info->request; + if (buffer->metadata().status == FrameMetadata::FrameCancelled) { info->metadataProcessed = true; @@ -1321,7 +1324,6 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer) * tryComplete() will delete info if it completes the IPU3Frame. * In that event, we must have obtained the Request before hand. */ - Request *request = info->request; if (frameInfos_.tryComplete(info)) pipe_->completeRequest(request); @@ -1333,6 +1335,7 @@ void IPU3CameraData::statBufferReady(FrameBuffer *buffer) ev.op = ipa::ipu3::EventStatReady; ev.frame = info->id; ev.bufferId = info->statBuffer->cookie(); + ev.controls = request->metadata(); ipa_->processEvent(ev); }