From patchwork Mon Jun 27 16:27:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16392 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 96E5DBD808 for ; Mon, 27 Jun 2022 16:28:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2C83D6563A; Mon, 27 Jun 2022 18:28:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656347280; bh=0CFR/QE0UmHxV/v04KGzFbyK814o/lukdYYX8q5xPDA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=GClNktlvW+XcVqBAVdp/kv29B4D/DOCZHSY6Wx+NHLhToXfLpsjz2Ks33uG9wXfri HQ5lBOjgo/V7YUih0AlGmq7S0V+/B+d3csPcxUp4ITNduZrWID0/vJNzTO1/5IU8xJ MzObH4Eh4Erdbs7tiwDMe7hxccACSOxIheGvcg1HgCDME0hug0FvYkGRZr2IXAemXB bhp47pkJf7l2G/p5w/LG2B8wwAtW0CRG+fzvNLOXPjQkNed0VCoid4HpF/Aqqv2JRO tY0JFNYjXpJSfQP0CrXA2keA5jynGiL3zAkwpwTe40WfwTjCcg7jHZ5mZio7qdIXFH uMViQl0MFLx/g== Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8D5506563F for ; Mon, 27 Jun 2022 18:27:51 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id C32D220004; Mon, 27 Jun 2022 16:27:50 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Jun 2022 18:27:28 +0200 Message-Id: <20220627162732.33160-12-jacopo@jmondi.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627162732.33160-1-jacopo@jmondi.org> References: <20220627162732.33160-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 11/15] libcamera: IPACameraSensorInfo: Add VBLANK 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: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The IPA modules need the V4L2_CID_VBLANK value to calculate the total frame size for the current sensor configuration. In order to prepare removing usage of V4L2_CID_VBLANK in IPA modules, add the vblank value to the IPACameraSensorInfo structure. Signed-off-by: Jacopo Mondi --- include/libcamera/ipa/core.mojom | 6 ++++++ src/libcamera/camera_sensor.cpp | 1 + 2 files changed, 7 insertions(+) diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom index 74f3339e56f2..d122fb7add4d 100644 --- a/include/libcamera/ipa/core.mojom +++ b/include/libcamera/ipa/core.mojom @@ -178,6 +178,11 @@ module libcamera; * The total line length in pixel clock periods, including blanking. */ +/** + * \var IPACameraSensorInfo::vblank + * \brief The vertical blanking, expressed in number of lines + */ + /** * \var IPACameraSensorInfo::minFrameLength * \brief The minimum allowable frame length in units of lines @@ -218,6 +223,7 @@ struct IPACameraSensorInfo { uint64 pixelRate; uint32 lineLength; + uint32 vblank; uint32 minFrameLength; uint32 maxFrameLength; diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 82e51272cccc..e8db9da84e6a 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -1004,6 +1004,7 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const int32_t hblank = ctrls.get(V4L2_CID_HBLANK).get(); info->lineLength = info->outputSize.width + hblank; info->pixelRate = ctrls.get(V4L2_CID_PIXEL_RATE).get(); + info->vblank = ctrls.get(V4L2_CID_VBLANK).get(); const ControlInfo vblank = ctrls.infoMap()->at(V4L2_CID_VBLANK); info->minFrameLength = info->outputSize.height + vblank.min().get();