From patchwork Mon Feb 1 12:56:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 11102 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 DB958BD808 for ; Mon, 1 Feb 2021 12:56:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A87C968405; Mon, 1 Feb 2021 13:56:49 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Yb6VQnKv"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E225268403 for ; Mon, 1 Feb 2021 13:56:47 +0100 (CET) Received: by mail-wm1-x330.google.com with SMTP id j18so12564686wmi.3 for ; Mon, 01 Feb 2021 04:56:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=owTe+UnimzoeH5UX2dLevt6U/8gQYnQ59u5O4axdyRA=; b=Yb6VQnKvnUDMRY6DM0addDK9Zx+VwOBqQUTHQKK6QoYlUyWDDK7kTPY+y8FnsX5Eh7 AW+8qeeQGgEKnnOHpXUmi5wpNHS5uoqgi4BbK7XYJdv5VvI09ttRCyJN0Kiw5q7T5+Ba t5rnMwbgTM+DH48CL7nxrZ5MvyyZNMGq/xiPrRO84X8sjXMS71Anb6HQitRS05vGyJGw iztZaNBF0ck1ymBXmqVRBhbfJiDz3LEFCW+0hifpZUCI+fDpqZ9poEfLi/SiscXRUxW+ xJ5iBfxrOXDAjz2HIqYv6e6sMIkSFk+sJtbHay8fAeICnbgxArfiSNHcIH5r8VO8VDBe Sl0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=owTe+UnimzoeH5UX2dLevt6U/8gQYnQ59u5O4axdyRA=; b=FmC/swbD5omg/Vkh46v6JTcI5F5zRXn9+ehqKS0gAJRmVNk+GLKGzzX0JH8ZGjKzYv ixAPYw9Z1dJhDyTbbcevg2MgWLcm1cX3qZubF84IBF85AAQasws+kgFrj5fhH7H0hNJ9 Ty7aknERZQ45OCUKCzLLTUZw7h8xDsZRQqo6vGIGxSDbBle1kF++bHffEnnqM4j/s0E7 Sm68WWhDI9rYsO2QGcTGXcHNhK1zMO0na6HhkT/MsY6ctUIvv7BrSwHAz17ACEfVqltR Jd4itaSFpmw4ZwFqmMU50ccvODw9zvI9qWcoBCmYnpkG10x5/u2WqkL9q+43mXfv35O4 AqPQ== X-Gm-Message-State: AOAM530qzhKUjh2UGY001mAGpCyQN8znKp8zhHhAhjhZlVij10hI6R1i rhJufIA7yg/u07/cFGpHEUyJ1fMfSAyVnCj5 X-Google-Smtp-Source: ABdhPJxbzigqHdCtiwgQytQQUmWCTSylFJxVZK0ySiggGNytUdhKb0+l93PkqttWl1HzNcy/c0xr8Q== X-Received: by 2002:a1c:65d5:: with SMTP id z204mr9636127wmb.184.1612184207332; Mon, 01 Feb 2021 04:56:47 -0800 (PST) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id r17sm12655002wro.46.2021.02.01.04.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 04:56:46 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 1 Feb 2021 12:56:33 +0000 Message-Id: <20210201125633.26242-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210201125633.26242-1-naush@raspberrypi.com> References: <20210201125633.26242-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] pipeline: raspberrypi: Always save sensor params on IPA_RESULT_SENSOR_PARAMS 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" Fixup logic when handling IPA_RESULT_SENSOR_PARAMS where we must always overwrite the parameters if provided by IPA. In the current codebase, this only happens once on startup, so there is no effective functional difference. But this change allows the option for the IPA to request new sensor parameters per-mode if required. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- .../pipeline/raspberrypi/raspberrypi.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 48e5943edc1a..63bdbe2b91bd 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -1224,17 +1224,15 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config) * Setup our delayed control writer with the sensor default * gain and exposure delays. */ - if (!delayedCtrls_) { - std::unordered_map delays = { - { V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] }, - { V4L2_CID_EXPOSURE, result.data[resultIdx++] }, - { V4L2_CID_VBLANK, result.data[resultIdx++] } - }; + std::unordered_map delays = { + { V4L2_CID_ANALOGUE_GAIN, result.data[resultIdx++] }, + { V4L2_CID_EXPOSURE, result.data[resultIdx++] }, + { V4L2_CID_VBLANK, result.data[resultIdx++] } + }; - delayedCtrls_ = std::make_unique(unicam_[Unicam::Image].dev(), delays); + delayedCtrls_ = std::make_unique(unicam_[Unicam::Image].dev(), delays); - sensorMetadata_ = result.data[resultIdx++]; - } + sensorMetadata_ = result.data[resultIdx++]; } if (result.operation & RPi::IPA_RESULT_SENSOR_CTRLS) {