linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table()
@ 2020-08-28  6:07 Viresh Kumar
  2020-08-28  6:07 ` [PATCH V2 1/8] cpufreq: imx6q: " Viresh Kumar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-08-28  6:07 UTC (permalink / raw)
  To: rnayak, Adrian Hunter, Andy Gross, Bjorn Andersson, Daniel Vetter,
	David Airlie, Fabio Estevam, Greg Kroah-Hartman, Jiri Slaby,
	Mark Brown, NXP Linux Team, Pengutronix Kernel Team, Qiang Yu,
	Rafael J. Wysocki, Rob Clark, Sascha Hauer, Sean Paul, Shawn Guo,
	Ulf Hansson, Viresh Kumar
  Cc: Nishanth Menon, Vincent Guittot, lima, linux-pm, Stephen Boyd,
	linux-arm-msm, Naresh Kamboju, linux-mmc, Douglas Anderson,
	dri-devel, linux-kernel, linux-serial, linux-spi, freedreno,
	linux-arm-kernel

Hello,

This cleans up some of the user code around calls to
dev_pm_opp_of_remove_table().

All the patches can be picked by respective maintainers directly except
for the last patch, which needs the previous two to get merged first.

These are based for 5.9-rc1.

Rajendra, Since most of these changes are related to qcom stuff, it
would be great if you can give them a try. I wasn't able to test them
due to lack of hardware.

Ulf, I had to revise the sdhci patch, sorry about that. Please pick this
one.

Diff between V1 and V2 is mentioned in each of the patches separately.

Viresh Kumar (8):
  cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table()
  drm/lima: Unconditionally call dev_pm_opp_of_remove_table()
  drm/msm: Unconditionally call dev_pm_opp_of_remove_table()
  mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()
  spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table()
  spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table()
  tty: serial: qcom_geni_serial: Unconditionally call
    dev_pm_opp_of_remove_table()
  qcom-geni-se: remove has_opp_table

 drivers/cpufreq/imx6q-cpufreq.c         | 10 ++--------
 drivers/gpu/drm/lima/lima_devfreq.c     |  6 +-----
 drivers/gpu/drm/lima/lima_devfreq.h     |  1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 14 +++++---------
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h |  1 -
 drivers/gpu/drm/msm/dsi/dsi_host.c      |  8 ++------
 drivers/mmc/host/sdhci-msm.c            | 14 +++++---------
 drivers/spi/spi-geni-qcom.c             | 13 +++++--------
 drivers/spi/spi-qcom-qspi.c             | 15 ++++++---------
 drivers/tty/serial/qcom_geni_serial.c   | 13 +++++--------
 include/linux/qcom-geni-se.h            |  2 --
 11 files changed, 31 insertions(+), 66 deletions(-)


base-commit: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
-- 
2.25.0.rc1.19.g042ed3e048af


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH V2 1/8] cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table()
  2020-08-28  6:07 [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar
@ 2020-08-28  6:07 ` Viresh Kumar
  2020-08-31 11:09 ` [PATCH V2 0/8] opp: " Viresh Kumar
  2020-09-09 15:28 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-08-28  6:07 UTC (permalink / raw)
  To: rnayak, Rafael J. Wysocki, Viresh Kumar, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
  Cc: Nishanth Menon, Vincent Guittot, linux-pm, Stephen Boyd,
	Naresh Kamboju, Douglas Anderson, linux-kernel, linux-arm-kernel

dev_pm_opp_of_remove_table() doesn't report any errors when it fails to
find the OPP table with error -ENODEV (i.e. OPP table not present for
the device). And we can call dev_pm_opp_of_remove_table()
unconditionally here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

---
V2: No changes.
---
 drivers/cpufreq/imx6q-cpufreq.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index ef7b34c1fd2b..5bf5fc759881 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -48,7 +48,6 @@ static struct clk_bulk_data clks[] = {
 };
 
 static struct device *cpu_dev;
-static bool free_opp;
 static struct cpufreq_frequency_table *freq_table;
 static unsigned int max_freq;
 static unsigned int transition_latency;
@@ -390,9 +389,6 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
 		goto put_reg;
 	}
 
-	/* Because we have added the OPPs here, we must free them */
-	free_opp = true;
-
 	if (of_machine_is_compatible("fsl,imx6ul") ||
 	    of_machine_is_compatible("fsl,imx6ull")) {
 		ret = imx6ul_opp_check_speed_grading(cpu_dev);
@@ -507,8 +503,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
 free_freq_table:
 	dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
 out_free_opp:
-	if (free_opp)
-		dev_pm_opp_of_remove_table(cpu_dev);
+	dev_pm_opp_of_remove_table(cpu_dev);
 put_reg:
 	if (!IS_ERR(arm_reg))
 		regulator_put(arm_reg);
@@ -528,8 +523,7 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev)
 {
 	cpufreq_unregister_driver(&imx6q_cpufreq_driver);
 	dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
-	if (free_opp)
-		dev_pm_opp_of_remove_table(cpu_dev);
+	dev_pm_opp_of_remove_table(cpu_dev);
 	regulator_put(arm_reg);
 	if (!IS_ERR(pu_reg))
 		regulator_put(pu_reg);
-- 
2.25.0.rc1.19.g042ed3e048af


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table()
  2020-08-28  6:07 [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar
  2020-08-28  6:07 ` [PATCH V2 1/8] cpufreq: imx6q: " Viresh Kumar
@ 2020-08-31 11:09 ` Viresh Kumar
  2020-09-09 11:08   ` Viresh Kumar
  2020-09-09 15:28 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Viresh Kumar @ 2020-08-31 11:09 UTC (permalink / raw)
  To: rnayak, Adrian Hunter, Andy Gross, Bjorn Andersson, Daniel Vetter,
	David Airlie, Fabio Estevam, Greg Kroah-Hartman, Jiri Slaby,
	Mark Brown, NXP Linux Team, Pengutronix Kernel Team, Qiang Yu,
	Rafael J. Wysocki, Rob Clark, Sascha Hauer, Sean Paul, Shawn Guo,
	Ulf Hansson
  Cc: Nishanth Menon, Vincent Guittot, lima, linux-pm, Stephen Boyd,
	linux-arm-msm, Naresh Kamboju, linux-mmc, Douglas Anderson,
	dri-devel, linux-kernel, linux-serial, linux-spi, freedreno,
	linux-arm-kernel

On 28-08-20, 11:37, Viresh Kumar wrote:
> Hello,
> 
> This cleans up some of the user code around calls to
> dev_pm_opp_of_remove_table().
> 
> All the patches can be picked by respective maintainers directly except
> for the last patch, which needs the previous two to get merged first.
> 
> These are based for 5.9-rc1.
 
> Viresh Kumar (8):
>   cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table()
>   drm/lima: Unconditionally call dev_pm_opp_of_remove_table()
>   drm/msm: Unconditionally call dev_pm_opp_of_remove_table()
>   mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()
>   spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table()
>   spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table()
>   tty: serial: qcom_geni_serial: Unconditionally call
>     dev_pm_opp_of_remove_table()
>   qcom-geni-se: remove has_opp_table

During testing by some of the Linaro folks on linux-next, we found out
that there was a bug in the OPP core (which makes the kernel crash in
some corner cases with these patches) for which I have sent a fix
today which should be part of 5.9-rc4:

https://lore.kernel.org/lkml/922ff0759a16299e24cacfc981ac07914d8f1826.1598865786.git.viresh.kumar@linaro.org/

Please apply the patches over rc4 only once it comes out (I will
confirm by that time once the patch gets merged). Else you guys can
provide your Ack and I can take the patches through OPP tree.

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table()
  2020-08-31 11:09 ` [PATCH V2 0/8] opp: " Viresh Kumar
@ 2020-09-09 11:08   ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2020-09-09 11:08 UTC (permalink / raw)
  To: rnayak, Adrian Hunter, Andy Gross, Bjorn Andersson, Daniel Vetter,
	David Airlie, Fabio Estevam, Greg Kroah-Hartman, Jiri Slaby,
	Mark Brown, NXP Linux Team, Pengutronix Kernel Team, Qiang Yu,
	Rafael J. Wysocki, Rob Clark, Sascha Hauer, Sean Paul, Shawn Guo,
	Ulf Hansson
  Cc: Nishanth Menon, Vincent Guittot, lima, linux-pm, Stephen Boyd,
	linux-arm-msm, Naresh Kamboju, linux-mmc, Douglas Anderson,
	dri-devel, linux-kernel, linux-serial, linux-spi, freedreno,
	linux-arm-kernel

On 31-08-20, 16:39, Viresh Kumar wrote:
> On 28-08-20, 11:37, Viresh Kumar wrote:
> > Hello,
> > 
> > This cleans up some of the user code around calls to
> > dev_pm_opp_of_remove_table().
> > 
> > All the patches can be picked by respective maintainers directly except
> > for the last patch, which needs the previous two to get merged first.
> > 
> > These are based for 5.9-rc1.
>  
> > Viresh Kumar (8):
> >   cpufreq: imx6q: Unconditionally call dev_pm_opp_of_remove_table()
> >   drm/lima: Unconditionally call dev_pm_opp_of_remove_table()
> >   drm/msm: Unconditionally call dev_pm_opp_of_remove_table()
> >   mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()
> >   spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table()
> >   spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table()
> >   tty: serial: qcom_geni_serial: Unconditionally call
> >     dev_pm_opp_of_remove_table()
> >   qcom-geni-se: remove has_opp_table
> 
> During testing by some of the Linaro folks on linux-next, we found out
> that there was a bug in the OPP core (which makes the kernel crash in
> some corner cases with these patches) for which I have sent a fix
> today which should be part of 5.9-rc4:
> 
> https://lore.kernel.org/lkml/922ff0759a16299e24cacfc981ac07914d8f1826.1598865786.git.viresh.kumar@linaro.org/
> 
> Please apply the patches over rc4 only once it comes out (I will
> confirm by that time once the patch gets merged). Else you guys can
> provide your Ack and I can take the patches through OPP tree.

The fix got merged in 5.9-rc4, please apply the patches from this
series in your trees and base them on rc4. Thanks.

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table()
  2020-08-28  6:07 [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar
  2020-08-28  6:07 ` [PATCH V2 1/8] cpufreq: imx6q: " Viresh Kumar
  2020-08-31 11:09 ` [PATCH V2 0/8] opp: " Viresh Kumar
@ 2020-09-09 15:28 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-09-09 15:28 UTC (permalink / raw)
  To: Fabio Estevam, rnayak, Rob Clark, Sean Paul, Bjorn Andersson,
	Viresh Kumar, Jiri Slaby, Greg Kroah-Hartman, David Airlie,
	Adrian Hunter, Daniel Vetter, Qiang Yu, Ulf Hansson, Sascha Hauer,
	Andy Gross, Rafael J. Wysocki, Shawn Guo, Pengutronix Kernel Team,
	NXP Linux Team
  Cc: Nishanth Menon, Vincent Guittot, linux-kernel, lima, linux-pm,
	Stephen Boyd, linux-arm-msm, Naresh Kamboju, linux-mmc,
	Douglas Anderson, dri-devel, linux-spi, linux-serial, freedreno,
	linux-arm-kernel

On Fri, 28 Aug 2020 11:37:45 +0530, Viresh Kumar wrote:
> This cleans up some of the user code around calls to
> dev_pm_opp_of_remove_table().
> 
> All the patches can be picked by respective maintainers directly except
> for the last patch, which needs the previous two to get merged first.
> 
> These are based for 5.9-rc1.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/2] spi: spi-geni-qcom: Unconditionally call dev_pm_opp_of_remove_table()
      commit: 7d568edff5cb7968cc5f29e85da15f941b8070b8
[2/2] spi: spi-qcom-qspi: Unconditionally call dev_pm_opp_of_remove_table()
      commit: 062cf7fc927d2546b58ed128383e5c52f26a00a5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-09 15:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28  6:07 [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar
2020-08-28  6:07 ` [PATCH V2 1/8] cpufreq: imx6q: " Viresh Kumar
2020-08-31 11:09 ` [PATCH V2 0/8] opp: " Viresh Kumar
2020-09-09 11:08   ` Viresh Kumar
2020-09-09 15:28 ` Mark Brown

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).