Message ID | 1461532104-24032-5-git-send-email-ivo.g.dimitrov.75@gmail.com (mailing list archive) |
---|---|
State | RFC, archived |
Delegated to: | Laurent Pinchart |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1auRJS-0007Im-6x; Sun, 24 Apr 2016 21:11:30 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-5) with esmtp id 1auRJQ-0001OP-7J; Sun, 24 Apr 2016 23:11:30 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbcDXVKZ (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sun, 24 Apr 2016 17:10:25 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33128 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257AbcDXVKS (ORCPT <rfc822;linux-media@vger.kernel.org>); Sun, 24 Apr 2016 17:10:18 -0400 Received: by mail-wm0-f66.google.com with SMTP id r12so17687915wme.0 for <linux-media@vger.kernel.org>; Sun, 24 Apr 2016 14:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AqHkV+XU9pvapnRFQcJZX5xno//B9woIKBetBHG3Yzw=; b=psFMDMa48LkwsvAU6eal5RxMdopJRO3QGy+A7RwVOPUTKXBrsFd18YHPZi3UZEQOEs 5Bq993lnlj3e6H+l9JQSYGXQPRCqPm3boqSL1pbDkRMex1chG4G93Qfo+IYsTVgvS11Q 7d6Fnf95zMnKwfGdloyD17Ejh+froKzJYqlcL4VyjXQg4WQl0Lh5c2eSLKwSKF5bE0Xo ls6346Tv4/f2obWbQjyGKgDeEnuj26jqsf5bQxdWt52vpwNIA5qnfYG45lalkYt34c2f DDofoW0RgDfIqKd7puuPpMiGWu8S0kT/XnnvmJxd9tlwh1KQVkvpkyJ1Iz9A0dSkj9gf 8mDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AqHkV+XU9pvapnRFQcJZX5xno//B9woIKBetBHG3Yzw=; b=hKcjfDmiX+jTZJ6L8e8XecEbFCvZCvzoSJkAR1l1MNDFv2dFiXVz7hv0vJ1V93rp26 63cxdg458SPH8EtsHsyaMXevbTd8ca7sggPAI5ZMqtZLkBeT7r1RSu49nGoKsnCkmzy9 /4G18jALChmmuF6IFNHrY1+ewYNVir9ueuB0aXhKSo8mgOU9WLjbzKpAkA+vT2MGZM3G JhQNwQlK2lHIEmkaGDzNLBuBVZJM+Kg/UXD9WvX32dYm02F8yKOxU/Mqw5U+78H2dxp7 xlf5SU8rlIKUhY8joziyp1OpH5jD3cEslgKxfBfqiqdSz4BLSFMifDxkhocg8xEjM2El Y2dw== X-Gm-Message-State: AOPr4FWd+t1mvNZ5Ofy4rMGSxmwFBTTffL2nmg3Ev0iN2zgfH3q4xP7dkD8F+tL34gQnjg== X-Received: by 10.28.29.195 with SMTP id d186mr3937241wmd.27.1461532217356; Sun, 24 Apr 2016 14:10:17 -0700 (PDT) Received: from localhost.localdomain ([46.249.74.23]) by smtp.gmail.com with ESMTPSA id b2sm15440182wmb.9.2016.04.24.14.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 14:10:16 -0700 (PDT) From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> To: sakari.ailus@iki.fi Cc: sre@kernel.org, pali.rohar@gmail.com, pavel@ucw.cz, linux-media@vger.kernel.org Subject: [RFC PATCH 04/24] smiapp-pll: Take existing divisor into account in minimum divisor check Date: Mon, 25 Apr 2016 00:08:04 +0300 Message-Id: <1461532104-24032-5-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> References: <20160420081427.GZ32125@valkosipuli.retiisi.org.uk> <1461532104-24032-1-git-send-email-ivo.g.dimitrov.75@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.4.24.210315 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, NO_URI_HTTPS 0, REFERENCES 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __DATE_TZ_RU 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __REFERENCES 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __YOUTUBE_RCVD 0' |
Commit Message
Ivaylo Dimitrov
April 24, 2016, 9:08 p.m. UTC
From: Sakari Ailus <sakari.ailus@iki.fi> Required added multiplier (and divisor) calculation did not take into account the existing divisor when checking the values against the minimum divisor. Do just that. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> --- drivers/media/i2c/smiapp-pll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Comments
Hi Ivaylo, On Mon, Apr 25, 2016 at 12:08:04AM +0300, Ivaylo Dimitrov wrote: > From: Sakari Ailus <sakari.ailus@iki.fi> > > Required added multiplier (and divisor) calculation did not take into > account the existing divisor when checking the values against the minimum > divisor. Do just that. > > Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> > --- > drivers/media/i2c/smiapp-pll.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c > index e3348db..5ad1edb 100644 > --- a/drivers/media/i2c/smiapp-pll.c > +++ b/drivers/media/i2c/smiapp-pll.c > @@ -227,7 +227,8 @@ static int __smiapp_pll_calculate( > > more_mul_factor = lcm(div, pll->pre_pll_clk_div) / div; > dev_dbg(dev, "more_mul_factor: %u\n", more_mul_factor); > - more_mul_factor = lcm(more_mul_factor, op_limits->min_sys_clk_div); > + more_mul_factor = lcm(more_mul_factor, > + DIV_ROUND_UP(op_limits->min_sys_clk_div, div)); > dev_dbg(dev, "more_mul_factor: min_op_sys_clk_div: %d\n", > more_mul_factor); > i = roundup(more_mul_min, more_mul_factor); I remember writing the patch, but I don't remember what for, or whether it was really needed. Does the secondary sensor work without this one?
Hi, On 1.05.2016 13:45, Sakari Ailus wrote: > Hi Ivaylo, > > On Mon, Apr 25, 2016 at 12:08:04AM +0300, Ivaylo Dimitrov wrote: >> From: Sakari Ailus <sakari.ailus@iki.fi> >> >> Required added multiplier (and divisor) calculation did not take into >> account the existing divisor when checking the values against the minimum >> divisor. Do just that. >> >> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> >> --- >> drivers/media/i2c/smiapp-pll.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c >> index e3348db..5ad1edb 100644 >> --- a/drivers/media/i2c/smiapp-pll.c >> +++ b/drivers/media/i2c/smiapp-pll.c >> @@ -227,7 +227,8 @@ static int __smiapp_pll_calculate( >> >> more_mul_factor = lcm(div, pll->pre_pll_clk_div) / div; >> dev_dbg(dev, "more_mul_factor: %u\n", more_mul_factor); >> - more_mul_factor = lcm(more_mul_factor, op_limits->min_sys_clk_div); >> + more_mul_factor = lcm(more_mul_factor, >> + DIV_ROUND_UP(op_limits->min_sys_clk_div, div)); >> dev_dbg(dev, "more_mul_factor: min_op_sys_clk_div: %d\n", >> more_mul_factor); >> i = roundup(more_mul_min, more_mul_factor); > > I remember writing the patch, but I don't remember what for, or whether it > was really needed. Does the secondary sensor work without this one? > [ 107.285919] smiapp 2-0010: lanes 1 [ 107.286010] smiapp 2-0010: reset -2, nvm 0, clk 9600000, mode 0 [ 107.286041] smiapp 2-0010: freq 0: 60000000 [ 107.289306] twl4030reg_is_enabled VAUX4 0 [ 107.303680] twl4030reg_enable VAUX4 0 [ 107.352233] smiapp 2-0010: module 0x01-0x022b [ 107.352325] smiapp 2-0010: module revision 0x04-0x00 date 00-00-00 [ 107.352355] smiapp 2-0010: sensor 0x00-0x0000 [ 107.352386] smiapp 2-0010: sensor revision 0x00 firmware version 0x00 [ 107.352416] smiapp 2-0010: smia version 10 smiapp version 00 [ 107.352447] smiapp 2-0010: the sensor is called vs6555, ident 01022b04 . . . [ 107.595672] smiapp 2-0010: unable to compute pre_pll divisor [ 107.611816] smiapp 2-0010: link freq 60000000 Hz, bpp 10 not ok [ 107.611816] smiapp 2-0010: no valid link frequencies for 10 bpp [ 107.618072] smiapp 2-0010: no supported mbus code found Or, in short, it does not work without this patch. Thanks, Ivo -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sunday 01 May 2016 13:45:24 Sakari Ailus wrote: > Hi Ivaylo, > > On Mon, Apr 25, 2016 at 12:08:04AM +0300, Ivaylo Dimitrov wrote: > > From: Sakari Ailus <sakari.ailus@iki.fi> > > > > Required added multiplier (and divisor) calculation did not take into > > account the existing divisor when checking the values against the minimum > > divisor. Do just that. > > > > Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> > > --- > > drivers/media/i2c/smiapp-pll.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c > > index e3348db..5ad1edb 100644 > > --- a/drivers/media/i2c/smiapp-pll.c > > +++ b/drivers/media/i2c/smiapp-pll.c > > @@ -227,7 +227,8 @@ static int __smiapp_pll_calculate( > > > > more_mul_factor = lcm(div, pll->pre_pll_clk_div) / div; > > dev_dbg(dev, "more_mul_factor: %u\n", more_mul_factor); > > - more_mul_factor = lcm(more_mul_factor, op_limits->min_sys_clk_div); > > + more_mul_factor = lcm(more_mul_factor, > > + DIV_ROUND_UP(op_limits->min_sys_clk_div, div)); > > dev_dbg(dev, "more_mul_factor: min_op_sys_clk_div: %d\n", > > more_mul_factor); > > i = roundup(more_mul_min, more_mul_factor); > > I remember writing the patch, but I don't remember what for, or whether it > was really needed. Does the secondary sensor work without this one? Hi! You sent me this patch more then 3 years ago. Look at our private email discussion, e.g. email with Message-Id <201303281524.10538@pali> and subject "Re: Nokia N900 - smiapp driver" which was sent years ago Thu, 28 Mar 2013 15:24:10 +0100.
On Mon 2016-04-25 00:08:04, Ivaylo Dimitrov wrote: > From: Sakari Ailus <sakari.ailus@iki.fi> > > Required added multiplier (and divisor) calculation did not take into > account the existing divisor when checking the values against the minimum > divisor. Do just that. > > Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Pavel Machek <pavel@ucw.cz>
diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c index e3348db..5ad1edb 100644 --- a/drivers/media/i2c/smiapp-pll.c +++ b/drivers/media/i2c/smiapp-pll.c @@ -227,7 +227,8 @@ static int __smiapp_pll_calculate( more_mul_factor = lcm(div, pll->pre_pll_clk_div) / div; dev_dbg(dev, "more_mul_factor: %u\n", more_mul_factor); - more_mul_factor = lcm(more_mul_factor, op_limits->min_sys_clk_div); + more_mul_factor = lcm(more_mul_factor, + DIV_ROUND_UP(op_limits->min_sys_clk_div, div)); dev_dbg(dev, "more_mul_factor: min_op_sys_clk_div: %d\n", more_mul_factor); i = roundup(more_mul_min, more_mul_factor);