From patchwork Mon Oct 26 17:19:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 10258 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 9A2F6BDB13 for ; Mon, 26 Oct 2020 17:19:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 468CD62048; Mon, 26 Oct 2020 18:19:21 +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="q0QvjBnK"; 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 6C80B62037 for ; Mon, 26 Oct 2020 18:19:18 +0100 (CET) Received: by mail-wm1-x330.google.com with SMTP id c194so12464353wme.2 for ; Mon, 26 Oct 2020 10:19:18 -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=zoc4yH1tGrvtNaaXgulQvSPpAXt0a3cFREKS4h0ENaQ=; b=q0QvjBnKs1pbcSVvnpxQFeRdXm/i4LNaSrdbast+2I9/1blbSAPdDyMw+pGqSw6/Yu 1+K/fwJSUYcz9inZ/+4qixsFzSiQti6KvmotLePUlUXIFkdgsrmBlCtOh4ZtOR4wPGHH 03VLAsDaFBavme2HzUfiWK56C6iL7oKeCWl1OBPLGtdUl79QSwHX541RsFNcJ8YwmZUH SF4rQ0P/jzA8GSwcANMkyYjr+5mkphKdRFuSI8zUPsNOZUzBTU+y7VXlNpkv/J0KNzyh fDOc4PKZgNNQ81SqoDqczii93NIEGK4GTerri2t9ZvCnrUN1AfYPMlElqpjLSKGO0KSY 0r9Q== 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=zoc4yH1tGrvtNaaXgulQvSPpAXt0a3cFREKS4h0ENaQ=; b=AQaIcKW/CIq7XKscMy6aSQY/nl+SM63MPzUem7fEX2LQYAugkhK3srJE5P1TrimkRb yLoa3WfPt048pKqgdF/JkkpTFkmbsOmvnu7MBI01TF4zq92GYHtuoSLBTD5gLwwR0ua3 ekG0TR+EOZ9lmHzdSfwHqd5JkIhk9cvwET4yvKShUIQkWg2u3mkcdG4sHoNZ3Gnssb/+ baXrg5fFT0IHTDu2j1L8eReyPTXcaevIynVoWiV+ye9++zwXdO5tKyK5dsqLRW6DXOda BTmXQd/CtNFqd8dQeUN5wFBVVfR6h0QhgQPK7O0uIFMlJ6pgq5rPsvzINTkrzDUv2SYi vOow== X-Gm-Message-State: AOAM531FdlW1cAhNYLIhi8uOFufwGKkETajp1n08xYYJI8XblQVl/JAX 4pMHOiM8XLwu82fXxNfDGWsJdrhydCk28g== X-Google-Smtp-Source: ABdhPJzMzaCPNeX+P78W1O38Va/Pg8wbMEWYPch1aeZJoV9V5iivk0mErMljZtI78ivrVREShdgFvA== X-Received: by 2002:a1c:254:: with SMTP id 81mr12627092wmc.21.1603732757980; Mon, 26 Oct 2020 10:19:17 -0700 (PDT) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id o63sm20955295wmo.2.2020.10.26.10.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 10:19:17 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 26 Oct 2020 17:19:05 +0000 Message-Id: <20201026171908.21463-4-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201026171908.21463-1-david.plowman@raspberrypi.com> References: <20201026171908.21463-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 3/6] libcamera: raspberrypi: Initialise the SensorCropMaximum property 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" Initialise it to show we support its use, however, set it to all zeroes to indicate that it's not meaningful yet. Signed-off-by: David Plowman 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 dd62dfc7..763451a8 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -926,6 +926,13 @@ bool PipelineHandlerRPi::match(DeviceEnumerator *enumerator) /* Initialize the camera properties. */ data->properties_ = data->sensor_->properties(); + /* + * Set a default value for the ScalerCropMaximum property to show + * that we support its use, however, initialise it to zero because + * it's not meaningful until a camera mode has been chosen. + */ + data->properties_.set(properties::ScalerCropMaximum, Rectangle{}); + /* * We cache three things about the sensor in relation to transforms * (meaning horizontal and vertical flips).