From patchwork Fri Jun 11 08:42:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12565 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 9813EC320B for ; Fri, 11 Jun 2021 08:42:42 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D39DE68939; Fri, 11 Jun 2021 10:42:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="dHqDv8kz"; dkim-atps=neutral Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E58D46029E for ; Fri, 11 Jun 2021 10:42:38 +0200 (CEST) Received: by mail-pl1-x62d.google.com with SMTP id h12so2491964plf.4 for ; Fri, 11 Jun 2021 01:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S/CTBALndrol7bWOFs/wylrYjCw+G6VOSg2fPR34U8E=; b=dHqDv8kzyjpyd1R+fXlETOCZU86gxypoOGZOMDPoDqPebbQqbA+JCYMuWFJD0dsnGJ j9jlGh7ZuL7pr1m5hdtwz/r0DdyLQsiPeRA1CxTS/30HCv7YPiJ7RIMalhPbzD8wj0qA 0uoqk4xhgk6PT25U8kk4x4ji12ow/84SqMUoQ= 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=S/CTBALndrol7bWOFs/wylrYjCw+G6VOSg2fPR34U8E=; b=q3aRsC2jYD9i5QLlRDyajZFJA//Pq8hRL2C0ADfzn+OOJroF9y+cyAAKstkehBRid+ MX4EKt4a8HtcJTEIW/ROcAwDPmhML/u2c9PGyCXX7l0UVgIjza28M/qhsK9EX/Me7Tzy O5kFh9lgw7pxlLFNrUsWjOl+f+PMeA+9X2rWBHgxa+ontEg63qPJhtj3PO4vlCAFKdd5 Rfk7kpKzYfaoCdw6z0F5Gw1d5KXW1aotRgi6oHzD+bwECjFBCzm5j73ci8xLIuZ2A0wC oCocUxqxFVaJbjoHhjNuZi55P9OqMWNYIrAFxZ23lvwRO3//PZ9KgKQbFYbo7/KHlraq 7zOw== X-Gm-Message-State: AOAM531QPfc+cck1Tcreo5ypp7MeaCcyjL5G8fyBGTZpFvq6AUzlnw9s t7kk5IRE42fc/nEVB/v5scvg98sRqr1kIQ== X-Google-Smtp-Source: ABdhPJzggJvbkNRBm4oWoaxgdNBNz3V/A9jdJNzFclYwHeibuahZtITRvgS5Jjbh+RI2ErTa0hIQYA== X-Received: by 2002:a17:90a:dac1:: with SMTP id g1mr8021092pjx.199.1623400957334; Fri, 11 Jun 2021 01:42:37 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:367e:c2e4:d691:eca1]) by smtp.gmail.com with ESMTPSA id 20sm4323542pfi.170.2021.06.11.01.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 01:42:36 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Jun 2021 17:42:26 +0900 Message-Id: <20210611084228.1830629-3-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.272.g935e593368-goog In-Reply-To: <20210611084228.1830629-1-hiroh@chromium.org> References: <20210611084228.1830629-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 2/4] libcamera: ipu3: Disable a sensor test pattern mode at initialization 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" Turns off a sensor test pattern mode at the initialization of the sensor. Without this, the camera sensor is configured with the last test pattern mode that has been set. Signed-off-by: Hirokazu Honda --- src/libcamera/pipeline/ipu3/cio2.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/cio2.cpp b/src/libcamera/pipeline/ipu3/cio2.cpp index 1be2cbcd..8548f749 100644 --- a/src/libcamera/pipeline/ipu3/cio2.cpp +++ b/src/libcamera/pipeline/ipu3/cio2.cpp @@ -9,6 +9,7 @@ #include +#include #include #include #include @@ -192,6 +193,13 @@ int CIO2Device::configure(const Size &size, V4L2DeviceFormat *outputFormat) LOG(IPU3, Debug) << "CIO2 output format " << outputFormat->toString(); + ret = sensor_->setTestPatternMode(controls::draft::TestPatternModeOff); + if (ret) { + LOG(IPU3, Error) + << "Failed to reset test pattern mode: " << ret; + return ret; + } + return 0; }