From patchwork Tue Jun 22 02:36:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12674 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 18C59C321B for ; Tue, 22 Jun 2021 02:37:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F0156893C; Tue, 22 Jun 2021 04:37:06 +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="J0Ma+yPD"; 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 DB96468935 for ; Tue, 22 Jun 2021 04:37:03 +0200 (CEST) Received: by mail-pl1-x62d.google.com with SMTP id x22so8118412pll.11 for ; Mon, 21 Jun 2021 19:37:03 -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=PEUhCurabQ7SLRxMeXHtynWRRCGWPJc8pvJwqNePAac=; b=J0Ma+yPDbMQW5H1GeOrTkSTsvngKbe/bBk7v/WMZjj5SuK6WiNxoYLt7g9KtpGmc5y BO0Bvr8Y15D9wDwmcWh8f6WUKH/iXGug4Llg5ZlTZD5SwasEgzgx0+2ub0W29bFHtFmH I0Cfme7Ahp5kEj5kns/YhmdXh1JIn7/IKhSw8= 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=PEUhCurabQ7SLRxMeXHtynWRRCGWPJc8pvJwqNePAac=; b=HcV4a/obObSmCNOtCLFnuEbDLD6RM80Q0ybJDT0oIHyfrsTPKgjEuVUZ9TZmqrGcmY KCoODwakv+Xlc4uVmz4G027B4i2ow5rv4wnUUcRDe094ZRU4R9LIjATDqKWil0Va9t77 /LlZBs22nyyg0Dg9gSLO+e2hzT2MbZdLdUaj8odka81kCTNw9HlR5PoNPGLlDatu1yie sti6QtXwqZ5R4Jar6MuabZDtsDktmnqjZ6Xrj+jULB010Ln7hsS9rDliDK+TtyZcIxtP IwJX9N9Jn/QknYCh/ESdlWPm3f4UX/nLRB7q9s9tXVtglbpi7OUslhr9MyMk8Z2SFQvR QJmg== X-Gm-Message-State: AOAM533lV0hkZS03jmAQTCHLDhoA9xuvnUR8wCF8Yi3Krd2/HgLOl7Ju rK82ZvqMHpk8wIPL9uSAoF737OJ7PioXlw== X-Google-Smtp-Source: ABdhPJzga2SI3nXeU4VtmBvkSVUWLAXIHV/zh+GGZqDWez27ut+ZFgOKAll6pHh8dnq/iE8l3JqHkA== X-Received: by 2002:a17:902:c613:b029:122:641e:8720 with SMTP id r19-20020a170902c613b0290122641e8720mr16001817plr.41.1624329422342; Mon, 21 Jun 2021 19:37:02 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:203:a025:f98b:b63b:e6b2]) by smtp.gmail.com with ESMTPSA id o7sm18947145pgs.45.2021.06.21.19.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 19:37:02 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Tue, 22 Jun 2021 11:36:52 +0900 Message-Id: <20210622023654.969162-3-hiroh@chromium.org> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210622023654.969162-1-hiroh@chromium.org> References: <20210622023654.969162-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v2 3/5] 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; }