All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] MediaTek SoC safe clock muxing and GPU clocks
@ 2022-09-27 10:11 ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 44+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-27 10:11 UTC (permalink / raw)
  To: matthias.bgg
  Cc: mturquette, sboyd, angelogioacchino.delregno, wenst, miles.chen,
	rex-bc.chen, nfraprado, chun-jie.chen, jose.exposito89, drinkcat,
	weiyi.lu, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, linux-clk, robh+dt, krzysztof.kozlowski+dt

This series adds a clock notifier for MediaTek clock muxes, required
in order to achieve stability for GPU DVFS.

The GPU frequency scaling mechanism requires us to switch the GPU
mux clock to a safe parent which frequency is always less or equal
to the "current" GPU frequency before reprogramming its dedicated
"MFG" PLL.
This is needed because the PLL needs time to reconfigure for its
output to stabilize (so, for the PLL to lock again): failing to do
so will lead to instabilities such as glitches, GPU lockups and/or
full system lockups.

While at it, reparenting of some GPU clocks was also performed, as
the clock tree was slightly incorrect.

This series was tested, along with mtk-regulator-coupler [1], on
Chromebooks with different SoCs (MT8183, MT8192, MT8195*), resulting
in fully working GPU DVFS with the Panfrost driver.

[1]: https://patchwork.kernel.org/project/linux-mediatek/patch/20220628120224.81180-1-angelogioacchino.delregno@collabora.com/

* MT8195 does not require mtk-regulator-coupler. This series, along
  with [1], are required to perform GPU DVFS also on non-Chromebook SoCs.

Changes in v3:
 - Clarified commit description in patch [05/10]

Changes in v2:
 - Added comment in clk-mt8195-topckgen to keep the mfg parents
   documented after removal, as suggested by Chen-Yu

AngeloGioacchino Del Regno (6):
  clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate
    changes
  clk: mediatek: clk-mt8195-topckgen: Register mfg_ck_fast_ref as
    generic mux
  clk: mediatek: clk-mt8195-topckgen: Add GPU clock mux notifier
  clk: mediatek: clk-mt8195-topckgen: Drop univplls from mfg mux parents
  clk: mediatek: clk-mt8192-mfg: Propagate rate changes to parent
  clk: mediatek: clk-mt8192: Add clock mux notifier for mfg_pll_sel

Chen-Yu Tsai (4):
  arm64: dts: mt8183: Fix Mali GPU clock
  clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent
  clk: mediatek: mux: add clk notifier functions
  clk: mediatek: mt8183: Add clk mux notifier for MFG mux

 arch/arm64/boot/dts/mediatek/mt8183.dtsi   |  2 +-
 drivers/clk/mediatek/clk-mt8183-mfgcfg.c   |  6 +--
 drivers/clk/mediatek/clk-mt8183.c          | 28 +++++++++++++
 drivers/clk/mediatek/clk-mt8192-mfg.c      |  6 ++-
 drivers/clk/mediatek/clk-mt8192.c          | 28 +++++++++++++
 drivers/clk/mediatek/clk-mt8195-mfg.c      |  6 ++-
 drivers/clk/mediatek/clk-mt8195-topckgen.c | 46 +++++++++++++++-------
 drivers/clk/mediatek/clk-mux.c             | 38 ++++++++++++++++++
 drivers/clk/mediatek/clk-mux.h             | 15 +++++++
 9 files changed, 153 insertions(+), 22 deletions(-)

-- 
2.37.2


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

end of thread, other threads:[~2022-12-16 11:25 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 10:11 [PATCH v3 00/10] MediaTek SoC safe clock muxing and GPU clocks AngeloGioacchino Del Regno
2022-09-27 10:11 ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 01/10] arm64: dts: mt8183: Fix Mali GPU clock AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-12-06 18:30   ` Nícolas F. R. A. Prado
2022-12-06 18:30     ` Nícolas F. R. A. Prado
2022-12-16 10:46     ` Matthias Brugger
2022-12-16 10:46       ` Matthias Brugger
2022-12-16 11:23   ` Matthias Brugger
2022-12-16 11:23     ` Matthias Brugger
2022-09-27 10:11 ` [PATCH v3 02/10] clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 03/10] clk: mediatek: mux: add clk notifier functions AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 04/10] clk: mediatek: mt8183: Add clk mux notifier for MFG mux AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 05/10] clk: mediatek: clk-mt8195-mfg: Reparent mfg_bg3d and propagate rate changes AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 06/10] clk: mediatek: clk-mt8195-topckgen: Register mfg_ck_fast_ref as generic mux AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 07/10] clk: mediatek: clk-mt8195-topckgen: Add GPU clock mux notifier AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 08/10] clk: mediatek: clk-mt8195-topckgen: Drop univplls from mfg mux parents AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-30  5:59   ` MandyJH Liu (劉人僖)
2022-09-30  5:59     ` MandyJH Liu (劉人僖)
2022-09-30  8:29     ` AngeloGioacchino Del Regno
2022-09-30  8:29       ` AngeloGioacchino Del Regno
2022-09-30  8:44       ` Chen-Yu Tsai
2022-09-30  8:44         ` Chen-Yu Tsai
2022-09-30  8:58         ` AngeloGioacchino Del Regno
2022-09-30  8:58           ` AngeloGioacchino Del Regno
2022-09-30  9:02           ` Chen-Yu Tsai
2022-09-30  9:02             ` Chen-Yu Tsai
2022-09-30  9:04             ` AngeloGioacchino Del Regno
2022-09-30  9:04               ` AngeloGioacchino Del Regno
2022-09-30  9:07               ` Chen-Yu Tsai
2022-09-30  9:07                 ` Chen-Yu Tsai
2022-09-27 10:11 ` [PATCH v3 09/10] clk: mediatek: clk-mt8192-mfg: Propagate rate changes to parent AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-27 10:11 ` [PATCH v3 10/10] clk: mediatek: clk-mt8192: Add clock mux notifier for mfg_pll_sel AngeloGioacchino Del Regno
2022-09-27 10:11   ` AngeloGioacchino Del Regno
2022-09-29  4:24 ` [PATCH v3 00/10] MediaTek SoC safe clock muxing and GPU clocks Chen-Yu Tsai
2022-09-29  4:24   ` Chen-Yu Tsai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.