From patchwork Wed May 5 13:53:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 12195 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 36C15BDE7C for ; Wed, 5 May 2021 13:53:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id ABE1B68919; Wed, 5 May 2021 15:53:16 +0200 (CEST) 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="ZjBmndS/"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C8C0468901 for ; Wed, 5 May 2021 15:53:14 +0200 (CEST) Received: by mail-wr1-x429.google.com with SMTP id t18so1951194wry.1 for ; Wed, 05 May 2021 06:53:14 -0700 (PDT) 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=Nnuaul9JxLvXBFAxzfREl6f2jmdSNj5M51MWow4y9o0=; b=ZjBmndS/+WJx/D2LuItCM8XWKCe/ELtX8ilaAT206Ucxq0rcL4hVEmQ0Z3eXVQ0pm7 6pdOL57hR5JJoXWvXErt+rQrQ5LBxTOGXQ0CVX+daxW+9HejIS+/n0d4koH7c08rWuU7 zKv6kpyQ7gc5cEDPNJUdUds4Ehm4txLJOyACY2ulaqzh/Bsg4ENEeyA7yCAzVmrH416D yJ6BvkJBkcknOZZye/ptryDhhRLJJ4OjZIXNVXf9IODfxINpG+ol+k4tU6s9LUwyY5Od 9Aa63kHz+eaK+lsMxufNfPWYPnLzHppGtl1DRUAUWhUc+vQaJyK9jHM4LIcyTKzY1frK njfw== 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=Nnuaul9JxLvXBFAxzfREl6f2jmdSNj5M51MWow4y9o0=; b=GSvE/T5LHQx5ySXxFlvtecJ0gj/Ni7Mu7oKbigyRo6I5vDaKHqhMfmZdO4bBHmKpF2 mlSdYXanwxtCX6zJWFT7xUreWs1OnseVknc5jQxRdmfGZIr6NOlWwZYILatwkeb1PsO/ iLNAW2DnB9cNAEjPw9hm4t+HX+Ilb2kICnyVLTpWWuhBrHaloBhID2pWZLs/2Bxg/KlC fzKJWzDQSlu+duIQ43y5xyb31qynMB+QVPPCuKj/CI6gekXss6HZMYTmJF8+Mha8QCAS xIULMl4HD40defL/ifjv/4bTkgUNaue5lOHzzz2OYbHW55McKv4AsALlXhh0L0Ovq2LB Eesw== X-Gm-Message-State: AOAM533jH8AMZG5oISo+GrQEL1OUkXMWat4yaAuSPSULBZPUw/bgXkSO oIdo3rB0+9ZGUv961Am2NAeWKZXnhXEJGA== X-Google-Smtp-Source: ABdhPJw9D7jjwFWkAVsU36vahtT61oBOHHH2hRUTfKsriGq/MK3WFaY7guU2lb/riQ4fm3xQZnkGCg== X-Received: by 2002:a05:6000:1789:: with SMTP id e9mr39414015wrg.110.1620222794386; Wed, 05 May 2021 06:53:14 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id q10sm5901645wmc.31.2021.05.05.06.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 06:53:13 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 5 May 2021 14:53:08 +0100 Message-Id: <20210505135308.1404-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210505135308.1404-1-david.plowman@raspberrypi.com> References: <20210505135308.1404-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/2] libcamera: pipeline: raspberrypi: Update ControlInfos after sensor format change 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" The Raspberry Pi pipeline handler does not update the sensor format using CameraSensor::setFormat, so it must manually force the update of the associated ControlInfos. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 2a917455..6288108d 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -608,6 +608,13 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config) if (ret) return ret; + /* + * The control ranges associated with the sensor may need updating + * after a format change. + * \todo Use the CameraSensor::setFormat API instead. + */ + data->sensor_->updateControlInfo(); + LOG(RPI, Info) << "Sensor: " << camera->id() << " - Selected mode: " << sensorFormat.toString();