From patchwork Sun Jun 10 15:42:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10456695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1BD0860234 for ; Sun, 10 Jun 2018 15:42:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BE1F26E54 for ; Sun, 10 Jun 2018 15:42:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0073726E69; Sun, 10 Jun 2018 15:42:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7756E26E54 for ; Sun, 10 Jun 2018 15:42:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753571AbeFJPmh (ORCPT ); Sun, 10 Jun 2018 11:42:37 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34129 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753462AbeFJPmg (ORCPT ); Sun, 10 Jun 2018 11:42:36 -0400 Received: by mail-pg0-f65.google.com with SMTP id q4-v6so7498495pgr.1 for ; Sun, 10 Jun 2018 08:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=dzuSo+kBYULdog4BjKHHOQnlTM9RvtVLHjoy8gIQVkg=; b=IqCXjeaNV75lkvcdQSDiX1bCuZilSlkuTPcJ5iHqzqhFH9xb3EaxjjaRNfYbdcLeCb HOF3cd6/XtxV//soMJSPeDhoDZjxo2JgjP9WVuc+xOF98VUDd++6JVLAfAc0nmo5vqla ZMmp7M5HsFuXbJyJwAgbh05k/uUT+gtl/ywmLd2EtF1Z0uhkqlfTqLlqJvr94qp/r7fF vMAlLq1vQ1Rof/ZMVeWo2v+F2RK5f2SW2WFNpj6vjMtN3R/6BomEXEsL6VnH7SYkADat L4+ZEn3Vm805zdwOkEXm7ZasL/TZJLd0PnJc6GG9G3vg2T3gL+/u5zXFeVU+QXu1nN3G EORA== 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; bh=dzuSo+kBYULdog4BjKHHOQnlTM9RvtVLHjoy8gIQVkg=; b=o3GXe1A7SDrb1M8n/q8vCrzSRXr7yxcViSjUrncl2CTL9a/vD239rGm4e40qOuspJb IjRMhwjzBgfdUkK/GWD4oONdHiAnjT1P4eA3z/m99F7FOycI2MtpH6VzRn0KPs5BJc+8 KCVjF+YuiR9f7/Jr6d+XYpEIsEVgXg2nGJ1YGrQULdM5JYHdwEWgUJkJZVK1Av0iKQ35 ulI2LShdb9g9nJ0/o7lm/PmSmKNdQD1DHXlQyJTPy2yVYNSnpmCI2TQkkcfGm38nRZga 8c1U4no6hezjZkHnMlhzPqO2M4S2ZkltuE+FyIJ/r5o7D9kdueuWgz8bs2UG3aqXU1pE h6ag== X-Gm-Message-State: APt69E2rNCtrAEOK/AeiCkDOwGDzh7geS3CO0LvdpSvK3o+8HHcvTlRK z0R8Qx52sIH5jFIBPegizrTTeg== X-Google-Smtp-Source: ADUXVKKUoHkBNjsb2F8vOPE1UMdo0I+27Lcy2C4alXYOswiRIHpCe/dW0LyDp3j4JJQ7UD2DIbi7xA== X-Received: by 2002:aa7:83d1:: with SMTP id j17-v6mr12980404pfn.236.1528645356245; Sun, 10 Jun 2018 08:42:36 -0700 (PDT) Received: from localhost.localdomain ([240f:34:212d:1:31d5:b0e6:bad0:c2da]) by smtp.gmail.com with ESMTPSA id q82-v6sm76873817pfg.170.2018.06.10.08.42.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 08:42:35 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org Cc: Akinobu Mita , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH] media: soc_camera: ov772x: correct setting of banding filter Date: Mon, 11 Jun 2018 00:42:26 +0900 Message-Id: <1528645346-19401-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The banding filter ON/OFF is controlled via bit 5 of COM8 register. It is attempted to be enabled in ov772x_set_params() by the following line. ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, 1); But this unexpectedly results disabling the banding filter, because the mask and set bits are exclusive. On the other hand, ov772x_s_ctrl() correctly sets the bit by: ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, BNDF_ON_OFF); The same fix was already applied to non-soc_camera version of ov772x driver in the commit commit a024ee14cd36 ("media: ov772x: correct setting of banding filter") Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Jacopo Mondi --- drivers/media/i2c/soc_camera/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/soc_camera/ov772x.c b/drivers/media/i2c/soc_camera/ov772x.c index 8063835..14377af 100644 --- a/drivers/media/i2c/soc_camera/ov772x.c +++ b/drivers/media/i2c/soc_camera/ov772x.c @@ -834,7 +834,7 @@ static int ov772x_set_params(struct ov772x_priv *priv, * set COM8 */ if (priv->band_filter) { - ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, 1); + ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, BNDF_ON_OFF); if (!ret) ret = ov772x_mask_set(client, BDBASE, 0xff, 256 - priv->band_filter);