From: "Heiko Stübner" <heiko@sntech.de>
To: Brian Norris <briannorris@chromium.org>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Chanwoo Choi <cwchoi00@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Elaine Zhang <zhangqing@rock-chips.com>,
linux-pm@vger.kernel.org, Doug Anderson <dianders@chromium.org>,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org
Subject: Re: [RFC PATCH 2/2] PM / devfreq: rk3399_dmc: Block PMU during transitions
Date: Thu, 14 Apr 2022 00:45:14 +0200 [thread overview]
Message-ID: <3484357.R56niFO833@diego> (raw)
In-Reply-To: <8824147c-5512-a7a5-9e89-60b510111500@gmail.com>
Hi,
Am Donnerstag, 14. April 2022, 00:14:40 CEST schrieb Chanwoo Choi:
> On 22. 4. 6. 10:48, Brian Norris wrote:
> > See the previous patch ("soc: rockchip: power-domain: Manage resource
> > conflicts with firmware") for a thorough explanation of the conflicts.
> > While ARM Trusted Firmware may be modifying memory controller and
> > power-domain states, we need to block the kernel's power-domain driver.
> >
> > If the power-domain driver is disabled, there is no resource conflict
> > and this becomes a no-op.
> >
> > Signed-off-by: Brian Norris <briannorris@chromium.org>
> > ---
> >
> > drivers/devfreq/rk3399_dmc.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c
> > index e494d1497d60..daff40702615 100644
> > --- a/drivers/devfreq/rk3399_dmc.c
> > +++ b/drivers/devfreq/rk3399_dmc.c
> > @@ -21,6 +21,7 @@
> > #include <linux/rwsem.h>
> > #include <linux/suspend.h>
> >
> > +#include <soc/rockchip/pm_domains.h>
> > #include <soc/rockchip/rk3399_grf.h>
> > #include <soc/rockchip/rockchip_sip.h>
> >
> > @@ -93,6 +94,16 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
> >
> > mutex_lock(&dmcfreq->lock);
> >
> > + /*
> > + * Ensure power-domain transitions don't interfere with ARM Trusted
> > + * Firmware power-domain idling.
> > + */
> > + err = rockchip_pmu_block();
> > + if (err) {
> > + dev_err(dev, "Failed to block PMU: %d\n", err);
> > + goto out_unlock;
> > + }
> > +
> > /*
> > * Some idle parameters may be based on the DDR controller clock, which
> > * is half of the DDR frequency.
> > @@ -198,6 +209,8 @@ static int rk3399_dmcfreq_target(struct device *dev, unsigned long *freq,
> > dmcfreq->volt = target_volt;
> >
> > out:
> > + rockchip_pmu_unblock();
> > +out_unlock:
> > mutex_unlock(&dmcfreq->lock);
> > return err;
> > }
>
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
so I guess you're ok with me picking up both patches, right?
[Just making sure :-) ]
Thanks
Heiko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-13 22:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 1:48 [RFC PATCH 0/2] rockchip / devfreq: Coordinate DRAM controller resources between ATF and kernel Brian Norris
2022-04-06 1:48 ` [RFC PATCH 1/2] soc: rockchip: power-domain: Manage resource conflicts with firmware Brian Norris
2022-04-06 2:26 ` Doug Anderson
2022-04-07 5:04 ` Chanwoo Choi
2022-04-09 3:34 ` Brian Norris
2022-04-12 16:01 ` Peter Geis
2022-04-13 22:14 ` Chanwoo Choi
2022-05-08 15:05 ` Heiko Stuebner
2022-04-06 1:48 ` [RFC PATCH 2/2] PM / devfreq: rk3399_dmc: Block PMU during transitions Brian Norris
2022-04-06 2:26 ` Doug Anderson
2022-04-13 22:14 ` Chanwoo Choi
2022-04-13 22:45 ` Heiko Stübner [this message]
2022-04-13 23:13 ` Chanwoo Choi
2022-05-07 14:21 ` Chanwoo Choi
2022-05-08 15:07 ` Heiko Stuebner
2022-05-08 18:42 ` Chanwoo Choi
2022-05-08 18:40 ` [RFC PATCH 0/2] rockchip / devfreq: Coordinate DRAM controller resources between ATF and kernel Chanwoo Choi
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=3484357.R56niFO833@diego \
--to=heiko@sntech.de \
--cc=briannorris@chromium.org \
--cc=cw00.choi@samsung.com \
--cc=cwchoi00@gmail.com \
--cc=dianders@chromium.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=myungjoo.ham@samsung.com \
--cc=zhangqing@rock-chips.com \
/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).