Message ID | 20230106072931.2317597-3-shravan.chippa@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp692717wrt; Thu, 5 Jan 2023 23:31:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuVNA/MHkr2Xm82UsRH4LuTsziao7ShaDruP5BEmf2vNW6gRj7aq+CIJdACco4iVEfXA4Rd X-Received: by 2002:a05:6a00:1485:b0:57f:ef11:acf6 with SMTP id v5-20020a056a00148500b0057fef11acf6mr65902802pfu.8.1672990262853; Thu, 05 Jan 2023 23:31:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672990262; cv=none; d=google.com; s=arc-20160816; b=Uc31A7f7TqcbY0FiK4WQR4lvNZRKEgvnOaa9J3fF3crEOnKExThyOrC/PsElLsPjQG Wn+sDDP7NzbpmLTQ+vtfGNfft8hxqHsemDGWora5O/RH3TGNe0CeU1JaEFJAZF7QuGYh YXdhcQe8g7Ko0jaHH8Us6JPwNDaekCqlvP3etzUg/vyERa9fqa6eRxWhIAn4PYbPGjYf RB9VaU5TvejspRCFqz5MNazpih0BW1WyyC76ycFn9Er4e3RtG20asMT82ie1a82EzKEw 1Er8SpZlNBMbUVXgJujglJwz6Bqt/x3FXPfHqmWwmuSsZXfbfV1rtrienWEl6UXL+Kw3 nJ0Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2eok36LxpbKDKl2WwiQ3yN2GdjhSm0SDidYbEb+Jx1Y=; b=hmHOlvPrZ6V4JXCjGOp+YpGI2m6BnXzJEkjJMiMrLN+IiwGwvKXKjaRjKtiAJ4l0wT DV7DZ9FZ4qJCvesWF1zpCBsUkhBZCcSdksmYtM5HopItBrvQB2eJUHe1aqyz6TJxXwh2 g5IuuHBlYLVERI5R/WLprF0smh28xl3vGBy3wn/I9/4AAravz3dO3++I1086LDs0FXIj zLOppZhHF12unJ2jiVufHRnJm5iU6uF37WFtvWcN/tgyyb32n+NO9w++Yht5Tbf1/3RL B32CJU/KyVEibwnh0f35WneuWPCQPBQ01vFm6xKeZtzd3iPaKw+FGVc76h/viz4HUY5z Sg5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=yw8utvxf; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a621708000000b00578b212e4e5si635091pfx.74.2023.01.05.23.30.50; Thu, 05 Jan 2023 23:31:02 -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 header.i=@microchip.com header.s=mchp header.b=yw8utvxf; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231831AbjAFH35 (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Fri, 6 Jan 2023 02:29:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231663AbjAFH3v (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Jan 2023 02:29:51 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45B4971FDE; Thu, 5 Jan 2023 23:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1672990190; x=1704526190; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4/SGhH4FsRjsw+rky4ZO/fBEOCSYA1HAoOeVNOBUVI0=; b=yw8utvxfdP/CzjgtR7B1d+UKbmpStT+WTARx7jhtaqYHBSCGxkhRKid7 q1tbc7x/o8xZ+om38iqGUcbYUNC458JKjlzEy7bZgHxX2oi/6Q4zkt+pt hxVwAG599F86fq4BMJTMSrNN2vFpfkoY4BG13UMYReFQJdE12UjlobIBx iduRIPvEWDaFcRtzlI/E6tOg9LaKNbYWHtOJNspWkvNNMxxi4pFHR42qM 6/uSDl/XDaJKV518h6mCSyRazKnmB10tKLB8nz6lISXErJqdzT2igYKvR sZmGFrpvWresPCcFCy4STpBWMdGulq3reDY1LDN3Yx1FpMYugb2CQl0YB w==; X-IronPort-AV: E=Sophos;i="5.96,304,1665471600"; d="scan'208";a="195658103" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 06 Jan 2023 00:29:49 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 6 Jan 2023 00:29:49 -0700 Received: from microchip1-OptiPlex-9020.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Fri, 6 Jan 2023 00:29:46 -0700 From: shravan kumar <shravan.chippa@microchip.com> To: <paul.j.murphy@intel.com>, <daniele.alessandrelli@intel.com>, <mchehab@kernel.org> CC: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>, "shravan kumar" <shravan.chippa@microchip.com> Subject: [PATCH v8 2/4] media: i2c: imx334: add missing reset values for mode 3840x2160_regs[] Date: Fri, 6 Jan 2023 12:59:29 +0530 Message-ID: <20230106072931.2317597-3-shravan.chippa@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230106072931.2317597-1-shravan.chippa@microchip.com> References: <20230106072931.2317597-1-shravan.chippa@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754257438218104612?= X-GMAIL-MSGID: =?utf-8?q?1754257438218104612?= |
Series |
media: i2c: imx334: support lower bandwidth mode
|
|
Commit Message
shravan chippa
Jan. 6, 2023, 7:29 a.m. UTC
From: Shravan Chippa <shravan.chippa@microchip.com> 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 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[]. Signed-off-by: Shravan Chippa <shravan.chippa@microchip.com> --- drivers/media/i2c/imx334.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
Comments
Hi Shravan On Fri, Jan 06, 2023 at 12:59:29PM +0530, shravan kumar wrote: > From: Shravan Chippa <shravan.chippa@microchip.com> > > 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 <shravan.chippa@microchip.com> > --- > 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 >
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}, }; /* Supported sensor mode configurations */