linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Viresh Kumar" <vireshk@kernel.org>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Peter De Schrijver" <pdeschrijver@nvidia.com>,
	"Mikko Perttunen" <mperttunen@nvidia.com>,
	"Peter Chen" <peter.chen@kernel.org>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Nishanth Menon" <nm@ti.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Michael Turquette" <mturquette@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-pwm@vger.kernel.org,
	linux-mmc@vger.kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org,
	Mark Brown <broonie@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Lucas Stach <dev@lynxeye.de>, Stefan Agner <stefan@agner.ch>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	David Heidelberg <david@ixit.cz>
Subject: [PATCH v13 00/35] NVIDIA Tegra power management patches for 5.16
Date: Mon, 27 Sep 2021 01:40:23 +0300	[thread overview]
Message-ID: <20210926224058.1252-1-digetx@gmail.com> (raw)

This series adds runtime PM support to Tegra drivers and enables core
voltage scaling for Tegra20/30 SoCs, resolving overheating troubles.

All patches in this series are interdependent and should go via Tegra tree.

Changelog:

v13: - Fixed compile-test error reported by build bot by reverting the
       mmc/ patch to v11. The sdhci_suspend/resume_host() functions aren't
       available with the disabled CONFIG_PM_SLEEP, some code needs the
       ifdef.

     - Added last r-b from Rob Herring for the DT patches.

     - Corrected clk/ PM domain-support patch by not using the
       devm_tegra_core_dev_init_opp_table_common() helper, which I
       utilized in v12. The clk driver implements its own power domain
       state syncing and common helper shouldn't be used. This fixes driver
       probing for some clocks on some devices. It was reported by
       Svyatoslav Ryhel for PLLE OPP error on T30 Asus Transformer tablet.

v12: - Added r-b from Rob Herring to the host1x binding patch.

     - Added acks from Hans Verkuil to the video decoder patches.

     - In the v11 changelog I forgot to mention that the clk-binding
       patch was also changed with a corrected regex pattern and removed
       'clocks' sub-node. This patch needs r-b or ack too.

     - Added new "Rename 3d power domains" patch to match the DT schema
       naming requirement. Thanks to David Heidelberg for spotting this
       problem.

     - Replaced #ifdef CONFIG_PM_SLEEP with maybe_unused in the MMC patch
       to make code cleaner.

v11: - Added acks and r-b from Rob Herring, Mark Brown and Miquel Raynal
       that were given to v8.

     - Corrected order of the new memory controller reset entry in
       device-trees and host1x DT binding patch, which was requested by
       Rob Herring.

     - Switched consumer drivers to use power domain state syncing done
       by new Tegra's common OPP-initialization helper.

     - Made use of new devm_pm_runtime_enable() helper that was added to
       v5.15 kernel, where appropriate.

     - Added "fuse: Use resource-managed helpers" patch.

     - Converted Tegra20/30 clk drivers to a proper platform drivers,
       which was requested by Thierry Reding.

     - Removed clk-bulk API usage from the MMC patch, which was requested
       by Thierry Reding.

     - Changed CORE power domain name to "core" in a new patch
       "Change name of core power domain".

     - Misc small fixes for problems that I found since v8, like couple
       typos in error code paths and restored working RPM for Tegra DRM
       UAPI v1 that was removed in v8 by accident.

v9-v10: Figured out remaining GENPD API changes with Ulf Hansson and
        Viresh Kumar. The OPP-sync helper that was used in v8 isn't needed
        anymore because GENPD API now allows consumer drivers to
        init rpm_pstate of power domains.

v8: - Added new generic dev_pm_opp_sync() helper that syncs OPP state with
      hardware. All drivers changed to use it. This replaces GENPD attach_dev
      callback hacks that were used in v7.

    - Added new patch patch "soc/tegra: regulators: Prepare for suspend"
      that fixes dying Tegra20 SoC after enabling VENC power domain during
      resume from suspend. It matches to what downstream kernel does on
      suspend/resume.

    - After a second thought, I dropped patches which added RPM to memory
      drivers since hardware is always-on and RPM not needed.

    - Replaced the "dummy host1x driver" patch with new "Disable unused
      host1x hardware" patch, since it's a cleaner solution.

Dmitry Osipenko (35):
  opp: Change type of dev_pm_opp_attach_genpd(names) argument
  soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()
  soc/tegra: pmc: Disable PMC state syncing
  soc/tegra: Don't print error message when OPPs not available
  dt-bindings: clock: tegra-car: Document new clock sub-nodes
  clk: tegra: Support runtime PM and power domain
  dt-bindings: host1x: Document OPP and power domain properties
  dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and
    GR3D
  gpu: host1x: Add runtime PM and OPP support
  gpu: host1x: Add host1x_channel_stop()
  drm/tegra: dc: Support OPP and SoC core voltage scaling
  drm/tegra: hdmi: Add OPP support
  drm/tegra: gr2d: Support generic power domain and runtime PM
  drm/tegra: gr3d: Support generic power domain and runtime PM
  drm/tegra: vic: Support system suspend
  usb: chipidea: tegra: Add runtime PM and OPP support
  bus: tegra-gmi: Add runtime PM and OPP support
  pwm: tegra: Add runtime PM and OPP support
  mmc: sdhci-tegra: Add runtime PM and OPP support
  mtd: rawnand: tegra: Add runtime PM and OPP support
  spi: tegra20-slink: Add OPP support
  media: dt: bindings: tegra-vde: Convert to schema
  media: dt: bindings: tegra-vde: Document OPP and power domain
  media: staging: tegra-vde: Support generic power domain
  soc/tegra: fuse: Reset hardware
  soc/tegra: fuse: Use resource-managed helpers
  soc/tegra: regulators: Prepare for suspend
  soc/tegra: pmc: Rename 3d power domains
  soc/tegra: pmc: Rename core power domain
  soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30
  ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees
  ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees
  ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x
  ARM: tegra: Add Memory Client resets to Tegra30 GR2D, GR3D and Host1x
  ARM: tegra20/30: Disable unused host1x hardware

 .../bindings/clock/nvidia,tegra20-car.yaml    |   37 +
 .../display/tegra/nvidia,tegra20-host1x.txt   |   53 +
 .../bindings/media/nvidia,tegra-vde.txt       |   64 -
 .../bindings/media/nvidia,tegra-vde.yaml      |  119 ++
 .../boot/dts/tegra20-acer-a500-picasso.dts    |    1 +
 arch/arm/boot/dts/tegra20-colibri.dtsi        |    3 +-
 arch/arm/boot/dts/tegra20-harmony.dts         |    3 +-
 arch/arm/boot/dts/tegra20-paz00.dts           |    1 +
 .../arm/boot/dts/tegra20-peripherals-opp.dtsi |  941 +++++++++++
 arch/arm/boot/dts/tegra20-seaboard.dts        |    3 +-
 arch/arm/boot/dts/tegra20-tamonten.dtsi       |    3 +-
 arch/arm/boot/dts/tegra20-trimslice.dts       |    9 +
 arch/arm/boot/dts/tegra20-ventana.dts         |    1 +
 arch/arm/boot/dts/tegra20.dtsi                |  116 +-
 .../tegra30-asus-nexus7-grouper-common.dtsi   |    1 +
 arch/arm/boot/dts/tegra30-beaver.dts          |    1 +
 arch/arm/boot/dts/tegra30-cardhu.dtsi         |    1 +
 arch/arm/boot/dts/tegra30-colibri.dtsi        |   17 +-
 arch/arm/boot/dts/tegra30-ouya.dts            |    1 +
 .../arm/boot/dts/tegra30-peripherals-opp.dtsi | 1412 +++++++++++++++++
 arch/arm/boot/dts/tegra30.dtsi                |  175 +-
 drivers/bus/tegra-gmi.c                       |   52 +-
 drivers/clk/tegra/Makefile                    |    1 +
 drivers/clk/tegra/clk-device.c                |  230 +++
 drivers/clk/tegra/clk-pll.c                   |    2 +-
 drivers/clk/tegra/clk-super.c                 |    2 +-
 drivers/clk/tegra/clk-tegra20.c               |   77 +-
 drivers/clk/tegra/clk-tegra30.c               |  116 +-
 drivers/clk/tegra/clk.c                       |   75 +-
 drivers/clk/tegra/clk.h                       |    2 +
 drivers/gpu/drm/tegra/dc.c                    |   74 +
 drivers/gpu/drm/tegra/dc.h                    |    2 +
 drivers/gpu/drm/tegra/gr2d.c                  |  155 +-
 drivers/gpu/drm/tegra/gr3d.c                  |  388 ++++-
 drivers/gpu/drm/tegra/hdmi.c                  |   16 +-
 drivers/gpu/drm/tegra/vic.c                   |    4 +
 drivers/gpu/host1x/channel.c                  |    8 +
 drivers/gpu/host1x/debug.c                    |   15 +
 drivers/gpu/host1x/dev.c                      |  151 +-
 drivers/gpu/host1x/dev.h                      |    3 +-
 drivers/gpu/host1x/hw/channel_hw.c            |   44 +-
 drivers/gpu/host1x/intr.c                     |    3 -
 drivers/gpu/host1x/syncpt.c                   |    5 +-
 drivers/mmc/host/sdhci-tegra.c                |   82 +-
 drivers/mtd/nand/raw/tegra_nand.c             |   55 +-
 drivers/opp/core.c                            |    6 +-
 drivers/pwm/pwm-tegra.c                       |   88 +-
 drivers/soc/tegra/common.c                    |    4 +-
 drivers/soc/tegra/fuse/fuse-tegra.c           |   51 +-
 drivers/soc/tegra/fuse/fuse-tegra20.c         |   33 +-
 drivers/soc/tegra/fuse/fuse.h                 |    1 +
 drivers/soc/tegra/pmc.c                       |   27 +-
 drivers/soc/tegra/regulators-tegra20.c        |   99 ++
 drivers/soc/tegra/regulators-tegra30.c        |  122 ++
 drivers/spi/spi-tegra20-slink.c               |   10 +-
 drivers/staging/media/tegra-vde/vde.c         |   57 +-
 drivers/usb/chipidea/ci_hdrc_tegra.c          |   53 +-
 include/linux/host1x.h                        |    1 +
 include/linux/pm_opp.h                        |    8 +-
 include/soc/tegra/common.h                    |   24 +
 60 files changed, 4751 insertions(+), 357 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nvidia,tegra-vde.txt
 create mode 100644 Documentation/devicetree/bindings/media/nvidia,tegra-vde.yaml
 create mode 100644 drivers/clk/tegra/clk-device.c

-- 
2.32.0


             reply	other threads:[~2021-09-26 22:42 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-26 22:40 Dmitry Osipenko [this message]
2021-09-26 22:40 ` [PATCH v13 01/35] opp: Change type of dev_pm_opp_attach_genpd(names) argument Dmitry Osipenko
2021-10-04  9:11   ` Viresh Kumar
2021-09-26 22:40 ` [PATCH v13 02/35] soc/tegra: Add devm_tegra_core_dev_init_opp_table_common() Dmitry Osipenko
2021-10-01 12:50   ` Ulf Hansson
2021-10-01 19:15     ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 03/35] soc/tegra: pmc: Disable PMC state syncing Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 04/35] soc/tegra: Don't print error message when OPPs not available Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 05/35] dt-bindings: clock: tegra-car: Document new clock sub-nodes Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 06/35] clk: tegra: Support runtime PM and power domain Dmitry Osipenko
2021-10-01 12:32   ` Ulf Hansson
2021-10-01 19:50     ` Dmitry Osipenko
2021-10-02 20:44     ` Dmitry Osipenko
2021-10-05 13:10       ` Ulf Hansson
2021-10-05 22:19         ` Dmitry Osipenko
2021-10-05 22:43           ` Dmitry Osipenko
2021-10-06  2:40             ` Dmitry Osipenko
2021-10-06 12:43             ` Ulf Hansson
2021-10-06 21:14               ` Dmitry Osipenko
2021-10-06 22:01                 ` Dmitry Osipenko
2021-10-06 23:21                   ` Dmitry Osipenko
2021-10-07  9:18                     ` Ulf Hansson
2021-10-07 10:36                       ` Dmitry Osipenko
2021-10-06 12:38           ` Ulf Hansson
2021-10-06 21:20             ` Dmitry Osipenko
2021-10-06 21:25             ` Dmitry Osipenko
2021-10-06 22:03             ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 07/35] dt-bindings: host1x: Document OPP and power domain properties Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 08/35] dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and GR3D Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 09/35] gpu: host1x: Add runtime PM and OPP support Dmitry Osipenko
2021-10-01 13:24   ` Ulf Hansson
2021-09-26 22:40 ` [PATCH v13 10/35] gpu: host1x: Add host1x_channel_stop() Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 11/35] drm/tegra: dc: Support OPP and SoC core voltage scaling Dmitry Osipenko
2021-10-01 13:27   ` Ulf Hansson
2021-10-16 15:36     ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 12/35] drm/tegra: hdmi: Add OPP support Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 13/35] drm/tegra: gr2d: Support generic power domain and runtime PM Dmitry Osipenko
2021-10-01 13:39   ` Ulf Hansson
2021-10-01 14:29     ` Dmitry Osipenko
2021-10-01 14:55       ` Ulf Hansson
2021-10-01 19:00         ` Dmitry Osipenko
2021-10-04 11:01           ` Ulf Hansson
2021-10-04 15:57             ` Dmitry Osipenko
2021-10-05  8:45               ` Ulf Hansson
2021-10-05 17:16                 ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 14/35] drm/tegra: gr3d: " Dmitry Osipenko
2021-10-01 14:06   ` Ulf Hansson
2021-10-01 21:25     ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 15/35] drm/tegra: vic: Support system suspend Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 16/35] usb: chipidea: tegra: Add runtime PM and OPP support Dmitry Osipenko
2021-09-30  0:40   ` Dmitry Osipenko
2021-09-30 14:06   ` Peter Chen
2021-09-30 14:08     ` Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 17/35] bus: tegra-gmi: " Dmitry Osipenko
2021-10-01 14:18   ` Ulf Hansson
2021-09-26 22:40 ` [PATCH v13 18/35] pwm: tegra: " Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 19/35] mmc: sdhci-tegra: " Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 20/35] mtd: rawnand: tegra: " Dmitry Osipenko
2021-10-01 14:24   ` Ulf Hansson
2021-10-01 14:35     ` Dmitry Osipenko
2021-10-01 15:01       ` Ulf Hansson
2021-10-17  8:38         ` Dmitry Osipenko
2021-10-19 11:40           ` Ulf Hansson
2021-09-26 22:40 ` [PATCH v13 21/35] spi: tegra20-slink: Add " Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 22/35] media: dt: bindings: tegra-vde: Convert to schema Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 23/35] media: dt: bindings: tegra-vde: Document OPP and power domain Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 24/35] media: staging: tegra-vde: Support generic " Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 25/35] soc/tegra: fuse: Reset hardware Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 26/35] soc/tegra: fuse: Use resource-managed helpers Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 27/35] soc/tegra: regulators: Prepare for suspend Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 28/35] soc/tegra: pmc: Rename 3d power domains Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 29/35] soc/tegra: pmc: Rename core power domain Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 30/35] soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30 Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 31/35] ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 32/35] ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 33/35] ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 34/35] ARM: tegra: Add Memory Client resets to Tegra30 " Dmitry Osipenko
2021-09-26 22:40 ` [PATCH v13 35/35] ARM: tegra20/30: Disable unused host1x hardware Dmitry Osipenko
2021-10-01 14:36 ` [PATCH v13 00/35] NVIDIA Tegra power management patches for 5.16 Ulf Hansson
2021-10-01 14:40   ` Dmitry Osipenko
2021-10-01 15:02     ` Ulf Hansson
2021-10-04  9:11 ` Viresh Kumar
2021-10-04 14:52   ` Dmitry Osipenko

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=20210926224058.1252-1-digetx@gmail.com \
    --to=digetx@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=broonie@kernel.org \
    --cc=david@ixit.cz \
    --cc=dev@lynxeye.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=mperttunen@nvidia.com \
    --cc=mturquette@baylibre.com \
    --cc=nm@ti.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=peter.chen@kernel.org \
    --cc=richard@nod.at \
    --cc=sboyd@kernel.org \
    --cc=stefan@agner.ch \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=vigneshr@ti.com \
    --cc=vireshk@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 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).