From patchwork Tue Apr 6 10:40:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 11845 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 D0AB8C0DA6 for ; Tue, 6 Apr 2021 10:41:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6F42B68786; Tue, 6 Apr 2021 12:41:02 +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="fEnISpvn"; dkim-atps=neutral Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 429A360518 for ; Tue, 6 Apr 2021 12:41:00 +0200 (CEST) Received: by mail-ej1-x62b.google.com with SMTP id qo10so10751801ejb.6 for ; Tue, 06 Apr 2021 03:41:00 -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=pHWsuaUAOfYCTjB2UPiy2vk4CMfqOc1BkAGZ1TZWZmk=; b=fEnISpvn3IJv57Qda3m5JWKAFl6BEh8bcp3MnYUxREe4LQyiSVyC3ouR/ETX8rTZow LCL9fgDmC3CF0b/OhZANOq6cxek7a0nM3c3CEl9BhPAlBBBeUxXpNfmV8dTTWKeGhs7q hh52FSyDDH8l8gw1tlv8JeO083AdpYOrXUEuSkeX2IKMz6YkkiVclmNfvbABo+VpUAN2 EfTI3b9fZ46C8nvpUaYno9m+yvMuKzJ5QtMf1tkOvGMa2c+mPS16YU9TW6cGvS2wBWw5 CDZLb6lptaZyCh3LCEcZA+/5gYvf4gPD+kW3tf93k/BsGw0GVw0JsRjPThJu6wVVGDla XEcg== 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=pHWsuaUAOfYCTjB2UPiy2vk4CMfqOc1BkAGZ1TZWZmk=; b=jj/W4TrshTye6+oh6fT+54EyIgg95pHdqd26oc7S15KGNEVwaDOB/qwCPZm5Xsq0hx 1XN3GsPkGpOlhUfwesOQkFenQ2Efh9YKWYf2ULVRnSrW1XYVaUbWWiS/1RmWEtWCQc7S LjsPAqnLCNY8iN2vtobQCTCGPRYf8M4QK6ii+p2+0MWW9xwS7qc7m5IrcByykbCIh6Xz tRyrTitcsKqFOoUTRUTGWfAY7ZnwHligBHRSGODdWlkgNkIBh4LN9akg7WKD+dEEOcao VMZSGMMxqSnvuUvz+yxVVOFCwJi6qMSTe02/EM9PvcYFTeGfLwyHaoSuRm+n+yG1MbQR lt/g== X-Gm-Message-State: AOAM533m9AfSfEWwloivv/k6wVFjcYWm09LhA9v/2hdbZRwoPM+9+1NU n3lV36npkbBqo/H8NsFM7AdFZyDAWtNbOg== X-Google-Smtp-Source: ABdhPJy5hLLNyCk0ixOSSvQ71o6MjsQA6OUQHywFy/vfGdqWV5Rnm+5eflSrijD32nYILreHoRNnkQ== X-Received: by 2002:a17:906:b53:: with SMTP id v19mr15897919ejg.542.1617705659776; Tue, 06 Apr 2021 03:40:59 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id df8sm4068486edb.4.2021.04.06.03.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 03:40:59 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Tue, 6 Apr 2021 11:40:50 +0100 Message-Id: <20210406104050.23814-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210406104050.23814-1-david.plowman@raspberrypi.com> References: <20210406104050.23814-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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: Kieran Bingham Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index f22e286e..bbcc15ec 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -608,6 +608,12 @@ 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. + */ + data->sensor_->updateControlInfos(); + LOG(RPI, Info) << "Sensor: " << camera->id() << " - Selected mode: " << sensorFormat.toString();