From: "Mats Randgaard (matrandg)" <matrandg@cisco.com>
To: linux-media@vger.kernel.org
Subject: Re: [RFC 04/12] [media] tc358743: fix set_pll to enable PLL with default frequency
Date: Mon, 04 May 2015 16:13:57 +0200 [thread overview]
Message-ID: <55477EA5.5070006@cisco.com> (raw)
In-Reply-To: <55477DAE.5040408@cisco.com>
On 03/30/2015 01:10 PM, Philipp Zabel wrote:
> set_pll not only skips PLL changes but also doesn't enable it in
> the first place if the rate is the same as the default values.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> ---
> drivers/media/i2c/tc358743.c | 5 +++-- 1 file changed, 3
> insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/tc358743.c
> b/drivers/media/i2c/tc358743.c index 85a0f7a..dd2ea16 100644 ---
> a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c
> @@ -606,6 +606,7 @@ static void tc358743_set_pll(struct v4l2_subdev
> *sd) struct tc358743_state *state = to_state(sd); struct
> tc358743_platform_data *pdata = &state->pdata; u16 pllctl0 =
> i2c_rd16(sd, PLLCTL0); + u16 pllctl1 = i2c_rd16(sd, PLLCTL1);
> u16 pllctl0_new = SET_PLL_PRD(pdata->pll_prd) |
> SET_PLL_FBD(pdata->pll_fbd);
>
> @@ -613,8 +614,8 @@ static void tc358743_set_pll(struct
> v4l2_subdev *sd)
>
> /* Only rewrite when needed, since rewriting triggers another
> format * change event. */ - if (pllctl0 != pllctl0_new) { -
> u32 hsck = (pdata->refclk_hz * pdata->pll_prd) / pdata->pll_fbd; +
> if ((pllctl0 != pllctl0_new) || ((pllctl1 & MASK_PLL_EN) == 0)) { +
> u32 hsck = (pdata->refclk_hz * pdata->pll_fbd) / pdata->pll_prd;
Yes, that is a bug that should be fixed!
The calculation of hsck is fixed in the latest version of the
driver.
Regards,
Mats Randgaard
next prev parent reply other threads:[~2015-05-04 14:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 11:10 [RFC 00/12] TC358743 async subdev and dt support Philipp Zabel
2015-03-30 11:10 ` [RFC 01/12] [media] Driver for Toshiba TC358743 CSI-2 to HDMI bridge Philipp Zabel
2015-03-30 11:10 ` [RFC 02/12] [media] tc358743: register v4l2 asynchronous subdevice Philipp Zabel
2015-05-04 14:09 ` Mats Randgaard (matrandg)
2015-03-30 11:10 ` [RFC 03/12] [media] tc358743: support probe from device tree Philipp Zabel
2015-05-04 14:09 ` Mats Randgaard (matrandg)
2015-03-30 11:10 ` [RFC 04/12] [media] tc358743: fix set_pll to enable PLL with default frequency Philipp Zabel
[not found] ` <55477DAE.5040408@cisco.com>
2015-05-04 14:13 ` Mats Randgaard (matrandg) [this message]
2015-03-30 11:10 ` [RFC 05/12] [media] tc358743: fix lane number calculation to include blanking Philipp Zabel
2015-05-04 14:09 ` Mats Randgaard (matrandg)
2015-03-30 11:10 ` [RFC 06/12] [media] tc358743: split set_csi into set_csi and start_csi Philipp Zabel
2015-03-30 11:10 ` [RFC 07/12] [media] tc358743: also set TCLK_TRAILCNT and TCLK_POSTCNT Philipp Zabel
2015-03-30 11:10 ` [RFC 08/12] [media] tc358743: parse MIPI CSI-2 endpoint, support noncontinuous clock Philipp Zabel
2015-03-30 11:10 ` [RFC 09/12] [media] tc358743: add direct interrupt handling Philipp Zabel
2015-03-30 11:10 ` [RFC 10/12] [media] tc358743: detect chip by ChipID instead of IntMask Philipp Zabel
2015-05-04 14:09 ` Mats Randgaard (matrandg)
2015-03-30 11:10 ` [RFC 11/12] [media] tc358743: don't return E2BIG from G_EDID Philipp Zabel
2015-03-30 11:10 ` [RFC 12/12] [media] tc358743: allow event subscription Philipp Zabel
2015-04-08 11:40 ` [RFC 00/12] TC358743 async subdev and dt support Mats Randgaard (matrandg)
[not found] ` <55477D9C.7050006@cisco.com>
2015-05-04 14:12 ` Mats Randgaard (matrandg)
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=55477EA5.5070006@cisco.com \
--to=matrandg@cisco.com \
--cc=linux-media@vger.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.