Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp2706668rwj; Mon, 19 Dec 2022 07:56:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf5LKCqiHXZWfEGG3YgeYJQDAOUEXrJxbYjwpppcjSndIInx6I+j5lYIUQH7AHi515022ZYI X-Received: by 2002:a17:902:76c1:b0:186:ad88:43a9 with SMTP id j1-20020a17090276c100b00186ad8843a9mr47295049plt.36.1671465380262; Mon, 19 Dec 2022 07:56:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671465380; cv=none; d=google.com; s=arc-20160816; b=pbtQdHNO6Es6tmHoOpiFjMtfNA53qzWtjjyy8mb7QwqxJ57ONVlYB1el+Ng3Igslzf 7Kh3Mt9+eseujHQe4NGGVpwfm9tNh+il36ONjZCQCB+KVHV+PizHiK+j0SX7QSHTv8Ei EGxhXo2/nvNL9vt+JVvwsQf/gNohXlDTurnIo7E9XRrgftZ0Ct7WVLomoHT9toevNrf4 aLOyieugoR2TUeC86XnkeT0dCVACPEyT31rhvlJkr/gQYZBAfAzeCyUkA4TAS7BwI+Yb os+j/p924JVqfQzcQY342Mc6LbI5H6ry6fuHb/iQX3X4LsTP+3PA4qQCEu3TahKwp9Gh 1bpQ== 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; bh=C1UQa4NR83FvFNedSUX7AKdNQeflM6AKlvTICB7sHcU=; b=kyHMvcjGeLNZci6b1oO37ESeJ2bN3omewnKzT+eNIMDuqj87ovyEqYGrawtgUn49qS Ht/D9vSFWmffiORtXwX+GLVkYMOSED2pJ448B9Q7Zzw0FInPcIGPVSHamqiYh1yJWYnn STUoI3YpgF9yhcbkVGakkXdD/yNS58qmFpUbKck5elw9ZfYrsyI1klcqI2twFLN0TqUK 4XDRyqIa4jbJ6uyGCRNn8pY5KZiNQYSAuhArfEZ7AwCIopMB4mo8SIWi6bBbkuxUS/0L lfQf99uFlQiRadxtuKxfx1I7g/Vv4s+zWUkmDvzCSdP8aeG/N1Sh3dHgEHs5amG0oaiw gPVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 x4-20020a63db44000000b00476e6407413si11604240pgi.15.2022.12.19.07.56.10; Mon, 19 Dec 2022 07:56:20 -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; 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 S232174AbiLSOp3 (ORCPT + 71 others); Mon, 19 Dec 2022 09:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbiLSOpA (ORCPT ); Mon, 19 Dec 2022 09:45:00 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38B9912AD2; Mon, 19 Dec 2022 06:44:18 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 51D1AE0007; Mon, 19 Dec 2022 14:44:14 +0000 (UTC) Date: Mon, 19 Dec 2022 15:44:14 +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 v7 1/5] media: i2c: imx334: modify link frequency as for the configureation Message-ID: <20221219144414.lfusj67ojjk2phkv@uno.localdomain> References: <20221219061526.3169369-1-shravan.chippa@microchip.com> <20221219061526.3169369-2-shravan.chippa@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221219061526.3169369-2-shravan.chippa@microchip.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 Mon, Dec 19, 2022 at 11:45:22AM +0530, shravan kumar wrote: > From: Shravan Chippa > > Currently imx334 sensor driver is configured for 1782Mbps/lane for > 3840x2160@60 resolution with reqired reg mode values but if we run the > command "v4l2-ctl --all -d /dev/v4l-subdevX" it is showing incorrect link > frequeny, This is because of the incorrect value of IMX334_LINK_FREQ > witch is 891000000. it should be 1782000000. > > In general with the value of 891000000 link frequency it is not possible > to configure 3840x2160@60 resolution. > > Fixes: 9746b11715c3 ("media: i2c: Add imx334 camera sensor driver") > > Signed-off-by: Shravan Chippa > --- > drivers/media/i2c/imx334.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c > index 7b0a9086447d..acc9f9f15e47 100644 > --- a/drivers/media/i2c/imx334.c > +++ b/drivers/media/i2c/imx334.c > @@ -49,7 +49,7 @@ > #define IMX334_INCLK_RATE 24000000 > > /* CSI2 HW configuration */ > -#define IMX334_LINK_FREQ 891000000 > +#define IMX334_LINK_FREQ 1782000000 Is this your reasoning ? width: 3840 hblank: 560 height: 2160 vblank: 2340 bpp: 12 fps: 60 lanes: 4 Total bandwidth: (3840 + 560) * (2160 + 2340) * 60 * 12 = 14.256.000.000 Bandwidth per lane = Total / 4 = 3.564.000.000 mipi clock = Bandwidth_per_lane / 2 = 1.782.000.000 Two questions: - Should you update the pixel clock as well ? It is currently set to 594000000 while as per the above reasoning it should be doubled too. - Where is the sensor's clock tree programmed in the driver ? It's kind of weird that the pixel_clock and link_freq in the driver are half of what they theoretically should be... > #define IMX334_NUM_DATA_LANES 4 > > #define IMX334_REG_MIN 0x00 > -- > 2.34.1 >