Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2142417rwl; Fri, 6 Jan 2023 02:26:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvx91BgqWvmQ76mCjEliI55hxNaibpW/AHrJCOCyiVEvtcN/DyAhRCYBlSBcTVHy0qRmpDs X-Received: by 2002:aa7:df16:0:b0:492:8c77:7dab with SMTP id c22-20020aa7df16000000b004928c777dabmr4959481edy.13.1673000819611; Fri, 06 Jan 2023 02:26:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673000819; cv=none; d=google.com; s=arc-20160816; b=mJRU14a8Y2t9+g+KAcfSBQpDUSi169fizPBHqAYCQQ8Y6vwd0giA30dUG9Gd4aWL3X FrN82LAHyEmOZ56doalvDv8pBVDsc4NQUJ0FIpyXzSDR4oKPFNDYJKInajgrVdvFmmTM pzxyfrtcsCMNf38Xypxpirqze6w6gDAXX5Cf3QhraR0Dz3NeI7SDFvh2zEfnWyQ1dlMb 3qWoqQ32pdLFJjV/Utxc+75MhEfaEWdkn+fr0j4TO8QmIAmGzmxsbjFYEdDbrvteF1wf 3PVQjmHhG0gq4m580/fi+sP4qschwuDe1ybozGkpXvHRXuTjzUTDMGgKtO/XsMeb5B+r dtIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BwXIEMUbxSzbBa7zn3NRZ48XG7po+p/6A9Ek0ObuyYo=; b=BmuiIK4SGGdBOsUXKMqS9K7nHzRlN8HBBiIPqW+vsqfwYYVr31K0YBKJJQCVaydJH2 eAzHBUQYpfgCYNprj3ARD+S46Ryvu7QAnZXlil6hh83ilp2psHbyO5WHLl9CmnTCcddn R8ur0bwwhVDPBpxOD05/lp9AcmtYfcRS+5Uh29ngrK8GrgJWBBDjM8fbCgmzL7DJSzrt wVnCGglNqD/fh/y3TBUvkF3dw1fnPrxmvmK+E0pfazXa5Z4mGsc0n7hGm3PIBHHNDysd 25e5szQN8wUukdNt3C4ovCHKXm+qv+CfTwhM6X+rxRahSJaXRikjgYC4+p4wN1uzr5rf OcHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jLFTKZJX; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a05640226c500b004971a0ee784si827302edd.463.2023.01.06.02.26.46; Fri, 06 Jan 2023 02:26:59 -0800 (PST) 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=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=jLFTKZJX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232757AbjAFJw2 (ORCPT + 54 others); Fri, 6 Jan 2023 04:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjAFJwY (ORCPT ); Fri, 6 Jan 2023 04:52:24 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1BC134D52; Fri, 6 Jan 2023 01:52:23 -0800 (PST) Received: from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32E9E4AE; Fri, 6 Jan 2023 10:52:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1672998742; bh=lIAU0L9csCgQrcqU9s1hO62N1jxYfhqjohcIhTHMs94=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jLFTKZJX9Ytap9LP8zNRjVo5qfOVf7PJCKkMZFeCpCAE8E2i6ED7xD/AAcNlWEJOf cSaEfDlktMwUTGpv5f9Zj+1wlbnyC39Trs9una2Yt+5uGAZ+eRrxgB9XQ47buMwzeO BkKUShJDcydKAV7AFL+1smS3w2ADnNX1MwWybtKI= Date: Fri, 6 Jan 2023 10:52:19 +0100 From: Jacopo Mondi To: shravan kumar Cc: paul.j.murphy@intel.com, daniele.alessandrelli@intel.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 2/4] media: i2c: imx334: add missing reset values for mode 3840x2160_regs[] Message-ID: <20230106095219.ar6zqwyu7u5dusq6@uno.localdomain> References: <20230106072931.2317597-1-shravan.chippa@microchip.com> <20230106072931.2317597-3-shravan.chippa@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230106072931.2317597-3-shravan.chippa@microchip.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 Hi Shravan On Fri, Jan 06, 2023 at 12:59:29PM +0530, shravan kumar wrote: > From: Shravan Chippa > > There are some missing reset reg_mode values for the 3840x2160@60 > resolution. The camera sensor still works in 3840x2160@60 resolution mode > because of the register reset values. This is an issue when we change the > modes dynamically. As an example, when we change the mode from 1920x1080@30 > resolution to 3840x2160@60 resoultion then the mode values will be written ^ rogue space > to the registers from the array mode_3840x2160_regs[] which gives the wrong > output which is incorrect resolution. > > So add the missing reset values to the mode_3840x2160_regs[]. > Are you resetting the registers to their default values, or are they actually tuned for 3840x2160 operations ? > Signed-off-by: Shravan Chippa > --- > drivers/media/i2c/imx334.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c > index ebacba3059b3..a4549d194cae 100644 > --- a/drivers/media/i2c/imx334.c > +++ b/drivers/media/i2c/imx334.c > @@ -166,6 +166,7 @@ static const struct imx334_reg mode_3840x2160_regs[] = { > {0x3288, 0x21}, > {0x328a, 0x02}, > {0x302c, 0x3c}, > + {0x302d, 0x00}, > {0x302e, 0x00}, > {0x302f, 0x0f}, > {0x3076, 0x70}, > @@ -240,7 +241,26 @@ static const struct imx334_reg mode_3840x2160_regs[] = { > {0x3794, 0x7a}, > {0x3796, 0xa1}, > {0x3e04, 0x0e}, > + {0x319e, 0x00}, > {0x3a00, 0x01}, > + {0x3A18, 0xBF}, > + {0x3A19, 0x00}, > + {0x3A1A, 0x67}, > + {0x3A1B, 0x00}, > + {0x3A1C, 0x6F}, > + {0x3A1D, 0x00}, > + {0x3A1E, 0xD7}, > + {0x3A1F, 0x01}, > + {0x3A20, 0x6F}, > + {0x3A21, 0x00}, > + {0x3A22, 0xCF}, > + {0x3A23, 0x00}, > + {0x3A24, 0x6F}, > + {0x3A25, 0x00}, > + {0x3A26, 0xB7}, > + {0x3A27, 0x00}, > + {0x3A28, 0x5F}, > + {0x3A29, 0x00}, Nit: this is a small bunch of registers, and all the rest of the table uses lowercase. Please do the same for sake of consistency. Thanks j > }; > > /* Supported sensor mode configurations */ > -- > 2.34.1 >