Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1556870iog; Thu, 16 Jun 2022 08:44:33 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uvYIcFe9MTaz4OJOdyO9lREUsb7bLaFpzpK7Ctqpy73VkpGBJyv+TEnBBxiPfdZObgtYA7 X-Received: by 2002:a17:902:efc6:b0:167:8177:60a7 with SMTP id ja6-20020a170902efc600b00167817760a7mr5153858plb.110.1655394272881; Thu, 16 Jun 2022 08:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655394272; cv=none; d=google.com; s=arc-20160816; b=m/9oaFTSm2Tr6vUinBdbdF+b7KRFopYPrz7KRG06wqtbjw+kmVwn3ljTyuLoA1OW7Z 8A3MkK5qLVS4uhJ5WEcERUiIVU3PN+mQd3jSfsqSfwuSx0zcM/31zoa2f6CeVIyS0I2m hXsMKQ8TnK1iN4+7uJptBq3+JyCj5aLJNG8357LwVz4pPO+TX9j2eYkZNTO6Ucstl/TF y813m1AUeCEq0RGtqUGkamXsniYnbiSwiAYPkI0LYzXt2B6974+5xSITcZeT77ML3Klw yqy3EItbk1hQBGMQRY51NHg61iRR5q7OSoXk4peQi+OFr75g+DXPLea/Zoo55OW66QeN /RFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=txl2FRtxWFbGHVMNyn3FVmf4v4vJNhv599YGGnKOmKs=; b=LpBJFakHWjVc4M5GbTRCx+eOVhWy8RAEZ6s2rzeuNFkciIKk32QsLtUi8iABpjIg87 C6oEmOAvJ1GsuMl1HbrVhP5KpL9ECLeQpV0hkqP1EqSLlMYMfSEyw4ygKo9mXHFZD/3X h/kNo6n9O5OECfiAdkc0Xl9gZ0xKhj8Me9LR9thOH76JYk93qwVWjcK+eNQD4uYIaNKP XcD/v+us8EkhMGdql9HPrRnCuma2gf8vlmoTBcG9/FOVkBYJ5iMYHTnXMHKRQx6JMrNT mhvAMJmCnsFxWPcGyCdry9fLlL246o2bJEG43htNegdpnRidn1E1LascpTNBwegeFN0y tmmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Qp07RPqo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170902e94700b0015e8daafcb0si2634035pll.239.2022.06.16.08.44.20; Thu, 16 Jun 2022 08:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=Qp07RPqo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235602AbiFPOnh (ORCPT + 99 others); Thu, 16 Jun 2022 10:43:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239233AbiFPOnV (ORCPT ); Thu, 16 Jun 2022 10:43:21 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9559A1F2FB; Thu, 16 Jun 2022 07:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1655390597; x=1686926597; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rWVbM8rJZf/kGgg+MoVGSQyw47/ojhqYjjLSMGPkWq8=; b=Qp07RPqofw67tZXEz96gS6g8tEeiazAwkaQqFFa63e8ww2PUwjz+8o+A mcgNv2l+9FGQPWwuMGHRdthChifidjU9R6A2uhwEZi2xJ3wmYyJ6H50S8 kbmpI41JVpVkm4Jd6pWu/ePdTlKefsGoz2VSiTEGySl8L68wNMufSthXv peSUcUEZO2o791ZMk1+/oOqV1dzDnMhCCAzYWqEDiCHD2hLIfgwrO/WvS azmOdmggMiXUzr2jXu9MAlitbeuaRPESCt9gkSOtgHg91eJQ1ez/8ghxK XSAqeyDHRk1DMqZ0NeuZkIcag93SYXNJWx4fiAJqHoyVG+RTthIPH5aNi Q==; X-IronPort-AV: E=Sophos;i="5.92,305,1650956400"; d="scan'208";a="160662022" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Jun 2022 07:43:17 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Jun 2022 07:43:15 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Jun 2022 07:43:13 -0700 From: Eugen Hristev To: CC: , Eugen Hristev Subject: [PATCH] media: atmel: atmel-isc-base: allow wb ctrls to be changed when isc is not configured Date: Thu, 16 Jun 2022 17:42:59 +0300 Message-ID: <20220616144259.226837-1-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When attempting to change the white balance (WB) ctrls before starting streaming, e.g.: # v4l2-ctl -L User Controls .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider .. # v4l2-ctl --set-ctrl=blue_component_gain=500 # v4l2-ctl -L .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=500 flags=slider .. These will not be written to the internal data struct and will not be written to the WB hardware module. Thus, after starting streaming, they will be reset to default: # v4l2-ctl -L .. blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider .. It does not make much sense to not be able to configure the WB controls at all times. Even if the sensor would not be RAW Bayer (and in this case the WB module is unavailable), the user could configure the ISC itself, as the ISC should not care about the sensor format. Thus, when WB module is available (if the sensor changes format e.g.) it will be already configured as be user's desires. In consequence, remove the check in isc_s_awb_ctrl that will return if ISC does not know the sensor format. Signed-off-by: Eugen Hristev --- drivers/media/platform/atmel/atmel-isc-base.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/platform/atmel/atmel-isc-base.c b/drivers/media/platform/atmel/atmel-isc-base.c index afefd15c3326..72a27a5c0c1e 100644 --- a/drivers/media/platform/atmel/atmel-isc-base.c +++ b/drivers/media/platform/atmel/atmel-isc-base.c @@ -1527,10 +1527,6 @@ static int isc_s_awb_ctrl(struct v4l2_ctrl *ctrl) else ctrls->awb = ISC_WB_NONE; - /* we did not configure ISC yet */ - if (!isc->config.sd_format) - break; - /* configure the controls with new values from v4l2 */ if (ctrl->cluster[ISC_CTRL_R_GAIN]->is_new) ctrls->gain[ISC_HIS_CFG_MODE_R] = isc->r_gain_ctrl->val; -- 2.25.1