From patchwork Tue Nov 22 12:03:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 17838 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 309A1BE08B for ; Tue, 22 Nov 2022 12:03:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9305A6331A; Tue, 22 Nov 2022 13:03:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1669118630; bh=+4t5GW42hwunTKg5AVNSx4qlf/brTzE+53ccYzxcwOk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=S1j2FnhUPaJnxhaJH8vEBdMNbLaVaHzjSv3MHDCdAt1XAuBW2N0oDdePMbb/RXLLg 9pyuw/k5N1qIpemol/LjJo2HjhiD6sqgjcAgE1wEKN5cEyDdZmDOIFQJDaJA4hCWDr bta6BQN9eZauHCxCRLTFt552dUgO1grkebFm139FXZ4K1WwJi0gBUCRu1hGcgkWNbq A0VkjfPAij+qqaRAOwj/GxLVil4BPtWB4WQYKh/6Ws6H8C92c30abQHVY0L4HVG7Du MVgaAA6iIF1KVULkWvSV35IL31lLHJyEIAzrDkQ+5ONoyGLQKk1Pd7RNqlW55ds4lo ql9EQAqZSEkow== Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7146D603CE for ; Tue, 22 Nov 2022 13:03:49 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="nqbU6NX9"; dkim-atps=neutral Received: by mail-wr1-x434.google.com with SMTP id v1so24329211wrt.11 for ; Tue, 22 Nov 2022 04:03:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zV0YnxPQk4XeqcnwW0qx32+hGcVdhE3+MawGWqd2KOo=; b=nqbU6NX9t5P8+e04pFGeec/b1ZcMaS5RdokiRSGrdYoy9iX/RRa6x+LSnOVb4aYZBB PHnHnjy1ovIqsJvyS95W8NWhGKSIhdSRuwBc+9Yu+WKB8FXldKQfR+Y1M7mElTPMzAyi C7uvRDnJqMb3qEhYj2culWGIK64DbCI1MpDJ+hWubvlcEw+GvxMZP1QifivIoilfYfpR LXtbGkIzb0813vPZey0ATWcnGjiHgDjy13xrT9V54tx5F9uvJAt5it+/0jLDw2RK/RWM 7ul7LoHo9ZvGY46ylgVjX2gameUGXRWxsmcpXECVavGL2TtFVn8/gzvPoDwvY69sthHi LJVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zV0YnxPQk4XeqcnwW0qx32+hGcVdhE3+MawGWqd2KOo=; b=jSeXQHUbqPj2+T0ZYz1xtekwl42BndxEnPnSEFkgMlLPfwcDnK6OQ/eP6AdmgkfkMk H5HbcgvEB7gn5FkvFEtgj07HCTnAVB2df2N8z5LT90FdlQPY1NmddvhuhGvVCCt9uBDZ KRuFKpvad6bXsfd7z8sk468E5zrOiIvr7e/5eCrYXSi8h51MYxCVwQzFfu4bw6PCtrOP x2psHMCqWjf00Bu0IYj7vn4Dm4Se2V4g3XJ4svpq7+FB+uzWGNunPuNv9/V4Yn29nSv7 M0olfqqokuZAx0YGuGpV4GJbwJBMWhUbcChSeNkICOfNcOBl8QcP/I6fYPO2y/5KdKbN Nq0g== X-Gm-Message-State: ANoB5pkjTaisXcgbFxaE6JZPezB2BA/7o3YUzsXHc+83N3UgnnBxMR4U tKmbiJnth5nxRzN6tg9U1EN6xyEOK4TE4A== X-Google-Smtp-Source: AA0mqf6qg9+I9pdJLwXMVIydyxxknNJZrud0Ng69pwUgHhrLWx5p8ekj32SVtIqYzj4wOrpWhIR+mA== X-Received: by 2002:a05:6000:235:b0:241:bd2b:f718 with SMTP id l21-20020a056000023500b00241bd2bf718mr12514856wrz.89.1669118628739; Tue, 22 Nov 2022 04:03:48 -0800 (PST) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id p18-20020adfe612000000b002366a624bd4sm12119141wrm.28.2022.11.22.04.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 04:03:48 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Tue, 22 Nov 2022 12:03:40 +0000 Message-Id: <20221122120343.4825-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Resolve invalid attempt to set sensor HBLANK control 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: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi Slightly in the same vein as recent sensor flip patches... We have the same problem with the HBLANK control, in that we're setting it at a moment (in CameraSensor::init) when we might not be allowed to. So there are three patches here: 1. The first moves that code into a helper function. 2 and 3. Pipeline handlers call the helper function. The background here is that when we (Raspberry Pi) added control of HBLANK in order to get longer exposure times, that control was updated to expose a min and max value. Other pipeline handlers however, might then assume that the minimum value was the current one, and so a workaround was suggested where we ensure HBLANK is forced to the minimum. These changes merely move where that happens. Thanks! David David Plowman (3): libcamera: camera_sensor: Add a function to reset the HBLANK interval libcamera: pipeline: rkisp1: Reset sensor HBLANK control libcamera: pipeline: ipu3: Reset sensor HBLANK control include/libcamera/internal/camera_sensor.h | 2 ++ src/libcamera/camera_sensor.cpp | 10 +++++++--- src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-)