From: Jernej Skrabec <jernej.skrabec@siol.net>
To: mripard@kernel.org, wens@csie.org
Cc: sboyd@kernel.org, mturquette@baylibre.com,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
airlied@linux.ie, linux-sunxi@googlegroups.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/5] clk: sunxi-ng: mp: fix parent rate change flag check
Date: Tue, 9 Feb 2021 18:58:56 +0100 [thread overview]
Message-ID: <20210209175900.7092-2-jernej.skrabec@siol.net> (raw)
In-Reply-To: <20210209175900.7092-1-jernej.skrabec@siol.net>
CLK_SET_RATE_PARENT flag is checked on parent clock instead of current
one. Fix that.
Fixes: 3f790433c3cb ("clk: sunxi-ng: Adjust MP clock parent rate when allowed")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
drivers/clk/sunxi-ng/ccu_mp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/sunxi-ng/ccu_mp.c b/drivers/clk/sunxi-ng/ccu_mp.c
index fa4ecb915590..9d3a76604d94 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.c
+++ b/drivers/clk/sunxi-ng/ccu_mp.c
@@ -108,7 +108,7 @@ static unsigned long ccu_mp_round_rate(struct ccu_mux_internal *mux,
max_m = cmp->m.max ?: 1 << cmp->m.width;
max_p = cmp->p.max ?: 1 << ((1 << cmp->p.width) - 1);
- if (!(clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT)) {
+ if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) {
ccu_mp_find_best(*parent_rate, rate, max_m, max_p, &m, &p);
rate = *parent_rate / p / m;
} else {
--
2.30.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2021-02-09 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 17:58 [PATCH v3 0/5] sunxi: fix H6 HDMI related issues Jernej Skrabec
2021-02-09 17:58 ` Jernej Skrabec [this message]
2021-02-10 10:29 ` [PATCH v3 1/5] clk: sunxi-ng: mp: fix parent rate change flag check Maxime Ripard
2021-02-11 2:28 ` Stephen Boyd
2021-02-11 5:39 ` Jernej Škrabec
2021-02-12 3:06 ` Stephen Boyd
2021-02-09 17:58 ` [PATCH v3 2/5] drm/sun4i: tcon: set sync polarity for tcon1 channel Jernej Skrabec
2021-02-09 17:58 ` [PATCH v3 3/5] drm/sun4i: dw-hdmi: always set clock rate Jernej Skrabec
2021-02-09 17:58 ` [PATCH v3 4/5] drm/sun4i: Fix H6 HDMI PHY configuration Jernej Skrabec
2021-02-09 17:59 ` [PATCH v3 5/5] drm/sun4i: dw-hdmi: Fix max. frequency for H6 Jernej Skrabec
2021-02-10 10:29 ` [PATCH v3 0/5] sunxi: fix H6 HDMI related issues Maxime Ripard
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=20210209175900.7092-2-jernej.skrabec@siol.net \
--to=jernej.skrabec@siol.net \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=wens@csie.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).