From: Liu Ying <Ying.Liu@freescale.com>
To: dri-devel@lists.freedesktop.org
Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
mturquette@linaro.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC v2 01/14] clk: divider: Correct parent clk round rate if no bestdiv is normally found
Date: Thu, 18 Dec 2014 15:11:23 +0800 [thread overview]
Message-ID: <1418886696-11636-2-git-send-email-Ying.Liu@freescale.com> (raw)
In-Reply-To: <1418886696-11636-1-git-send-email-Ying.Liu@freescale.com>
If no best divider is normally found, we will try to use the maximum divider.
We should not set the parent clock rate to be 1Hz by force for being rounded.
Instead, we should take the maximum divider as a base and calculate a correct
parent clock rate for being rounded.
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
---
v1->v2:
* None.
drivers/clk/clk-divider.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index c0a842b..f641d4b 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -311,7 +311,8 @@ static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate,
if (!bestdiv) {
bestdiv = _get_maxdiv(divider);
- *best_parent_rate = __clk_round_rate(__clk_get_parent(hw->clk), 1);
+ *best_parent_rate = __clk_round_rate(__clk_get_parent(hw->clk),
+ MULT_ROUND_UP(rate, bestdiv));
}
return bestdiv;
--
2.1.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-12-18 7:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 7:11 [PATCH RFC v2 00/14] Add support for i.MX MIPI DSI DRM driver Liu Ying
2014-12-18 7:11 ` Liu Ying [this message]
2014-12-18 7:11 ` [PATCH RFC v2 02/14] of: Add vendor prefix for Himax Technologies Inc Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 03/14] of: Add vendor prefix for Truly Semiconductors Limited Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 04/14] ARM: imx6q: Add GPR3 MIPI muxing control register field shift bits definition Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 05/14] ARM: imx6q: clk: Add the video_27m clock Liu Ying
2014-12-18 10:31 ` Philipp Zabel
2014-12-19 2:23 ` Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 06/14] ARM: dts: imx6qdl: Move existing MIPI DSI ports into a new 'ports' node Liu Ying
2014-12-18 10:33 ` Philipp Zabel
2014-12-19 2:25 ` Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 07/14] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 08/14] drm: imx: Add MIPI DSI host controller driver Liu Ying
2014-12-18 11:39 ` Philipp Zabel
2014-12-19 5:53 ` Liu Ying
2014-12-19 10:17 ` Philipp Zabel
2014-12-22 2:56 ` Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 09/14] drm: panel: Add support for Himax HX8369A MIPI DSI panel Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 10/14] ARM: dtsi: imx6qdl: Add support for MIPI DSI host controller Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 11/14] ARM: dts: imx6qdl-sabresd: Add support for TRULY TFT480800-16-E MIPI DSI panel Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 12/14] ARM: imx_v6_v7_defconfig: Cleanup for imx drm being moved out of staging Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 13/14] ARM: imx_v6_v7_defconfig: Add support for MIPI DSI host controller Liu Ying
2014-12-18 7:11 ` [PATCH RFC v2 14/14] ARM: imx_v6_v7_defconfig: Add support for Himax HX8369A panel Liu Ying
2014-12-19 6:33 ` Re:[PATCH RFC v2 00/14] Add support for i.MX MIPI DSI DRM driver Andy Yan
2014-12-19 7:46 ` [PATCH " Liu Ying
2014-12-19 9:43 ` shrk andy
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=1418886696-11636-2-git-send-email-Ying.Liu@freescale.com \
--to=ying.liu@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).