From: "Pali Rohár" <pali.rohar@gmail.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
sakari.ailus@iki.fi, sre@kernel.org, linux-media@vger.kernel.org,
galak@codeaurora.org, mchehab@osg.samsung.com,
linux-kernel@vger.kernel.org
Subject: Re: v4.9-rc1: smiapp divides by zero
Date: Sun, 23 Oct 2016 12:32:20 +0200 [thread overview]
Message-ID: <201610231232.20750@pali> (raw)
In-Reply-To: <20161023102213.GA13705@amd>
[-- Attachment #1: Type: Text/Plain, Size: 1698 bytes --]
On Sunday 23 October 2016 12:22:13 Pavel Machek wrote:
> Hi!
>
> I tried to update camera code on n900 to v4.9-rc1, and I'm getting
> some divide by zero, that eventually cascades into fcam-dev not
> working.
>
> mul is zero in my testing, resulting in divide by zero.
>
> (Note that this is going from my patched camera-v4.8 tree to
> camera-v4.9 tree.)
>
> Best regards,
> Pavel
Hi! Ideally look at existing camera patches. I do not know which one is
last, but here are some links:
https://github.com/freemangordon/linux-n900/tree/v4.6-rc4-n900-camera
https://github.com/freemangordon/linux-n900/tree/camera
https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera-ivo
https://git.kernel.org/cgit/linux/kernel/git/sre/linux-n900.git/log/?h=n900-camera
> diff --git a/drivers/media/i2c/smiapp-pll.c
> b/drivers/media/i2c/smiapp-pll.c index 5ad1edb..e0a6edd 100644
> --- a/drivers/media/i2c/smiapp-pll.c
> +++ b/drivers/media/i2c/smiapp-pll.c
> @@ -16,6 +16,8 @@
> * General Public License for more details.
> */
>
> +#define DEBUG
> +
> #include <linux/device.h>
> #include <linux/gcd.h>
> #include <linux/lcm.h>
> @@ -457,6 +459,10 @@ int smiapp_pll_calculate(struct device *dev,
> i = gcd(pll->pll_op_clk_freq_hz, pll->ext_clk_freq_hz);
> mul = div_u64(pll->pll_op_clk_freq_hz, i);
> div = pll->ext_clk_freq_hz / i;
> + if (!mul) {
> + dev_err(dev, "forcing mul to 1\n");
> + mul = 1;
> + }
> dev_dbg(dev, "mul %u / div %u\n", mul, div);
>
> min_pre_pll_clk_div =
Is not this patch still enough?
https://patchwork.kernel.org/patch/8921761/
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2016-10-23 10:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 15:39 [PATCH v3 0/2] media: add et8ek8 camera sensor driver and documentation Ivaylo Dimitrov
2016-06-11 15:39 ` [PATCH v3 1/2] media: Driver for Toshiba et8ek8 5MP sensor Ivaylo Dimitrov
2016-06-18 15:22 ` Pavel Machek
2016-06-18 15:37 ` Pali Rohár
2016-06-18 16:04 ` Pavel Machek
2016-06-18 16:11 ` Pali Rohár
2016-06-20 21:59 ` Sakari Ailus
2016-06-11 15:39 ` [PATCH v3 2/2] media: et8ek8: Add documentation Ivaylo Dimitrov
2016-06-14 22:05 ` Rob Herring
2016-06-15 4:31 ` Sakari Ailus
[not found] ` <20160615043116.GG26360-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2016-06-15 18:41 ` Rob Herring
2016-06-15 18:41 ` Rob Herring
2016-06-15 19:24 ` Ivaylo Dimitrov
2016-06-18 14:36 ` Pavel Machek
[not found] ` <1465659593-16858-1-git-send-email-ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-23 7:33 ` [PATCH v3 0/2] media: add et8ek8 camera sensor driver and documentation Pavel Machek
2016-10-23 7:33 ` Pavel Machek
2016-10-23 10:22 ` v4.9-rc1: smiapp divides by zero Pavel Machek
2016-10-23 10:32 ` Pali Rohár [this message]
2016-10-23 10:52 ` Pavel Machek
2016-10-23 14:09 ` Sakari Ailus
2016-10-23 18:33 ` Pavel Machek
2016-10-23 18:05 ` [PATCH v3 0/2] media: add et8ek8 camera sensor driver and documentation Ivaylo Dimitrov
[not found] ` <53284bf5-9a36-fbcb-5cac-4a64823c3516-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-10-23 18:17 ` Pavel Machek
2016-10-23 18:17 ` Pavel Machek
2016-10-23 18:36 ` Ivaylo Dimitrov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201610231232.20750@pali \
--to=pali.rohar@gmail.com \
--cc=galak@codeaurora.org \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=pavel@ucw.cz \
--cc=sakari.ailus@iki.fi \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.