linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/25] Add perf support to the rockchip-dfi driver
@ 2023-05-24  8:31 Sascha Hauer
  2023-05-24  8:31 ` [PATCH v5 01/25] PM / devfreq: rockchip-dfi: Make pmu regmap mandatory Sascha Hauer
                   ` (25 more replies)
  0 siblings, 26 replies; 57+ messages in thread
From: Sascha Hauer @ 2023-05-24  8:31 UTC (permalink / raw)
  To: linux-rockchip
  Cc: linux-arm-kernel, linux-kernel, linux-pm, Heiko Stuebner,
	Kyungmin Park, MyungJoo Ham, Will Deacon, Mark Rutland, kernel,
	Michael Riesch, Robin Murphy, Vincent Legoll, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, devicetree, Sascha Hauer

This is v5 of the series adding perf support to the rockchip DFI driver.

A lot has changed in the perf driver since v4. First of all the review
feedback from Robin and Jonathan has been integrated. The perf driver
now not only supports monitoring the total DDR utilization, but also the
individual channels. I also reworked the way the raw 32bit counter
values are summed up to 64bit perf values, so hopefully the code is
easier to follow now.

lockdep found out that that locking in the perf driver was broken, so I
reworked that as well. None of the perf hooks allows locking with
mutexes or spinlocks, so in perf it's not possible to enable the DFI
controller when needed. Instead I now unconditionally enable the DFI
controller during probe when perf is enabled.

Furthermore the hrtimer I use for reading out the hardware counter
values before they overflow race with perf. Now a seqlock is used to
prevent that.

The RK3588 device tree changes for the DFI were not part of v4. As
Vincent Legoll showed interest in testing this series the necessary
device tree changes are now part of this series.

Changes since v4:
- Add device tree changes for RK3588
- Use seqlock to protect perf counter values from hrtimer
- Unconditionally enable DFI when perf is enabled
- Bring back changes to dts/binding patches that were lost in v4

Changes since v3:
- Add RK3588 support

Changes since v2:
- Fix broken reference to binding
- Add Reviewed-by from Rob

Changes since v1:
- Fix example to actually match the binding and fix the warnings resulted thereof
- Make addition of rockchip,rk3568-dfi an extra patch

Sascha Hauer (25):
  PM / devfreq: rockchip-dfi: Make pmu regmap mandatory
  PM / devfreq: rockchip-dfi: Embed desc into private data struct
  PM / devfreq: rockchip-dfi: use consistent name for private data
    struct
  PM / devfreq: rockchip-dfi: Add SoC specific init function
  PM / devfreq: rockchip-dfi: dfi store raw values in counter struct
  PM / devfreq: rockchip-dfi: Use free running counter
  PM / devfreq: rockchip-dfi: introduce channel mask
  PM / devfreq: rk3399_dmc,dfi: generalize DDRTYPE defines
  PM / devfreq: rockchip-dfi: Clean up DDR type register defines
  PM / devfreq: rockchip-dfi: Add RK3568 support
  PM / devfreq: rockchip-dfi: Handle LPDDR2 correctly
  PM / devfreq: rockchip-dfi: Handle LPDDR4X
  PM / devfreq: rockchip-dfi: Pass private data struct to internal
    functions
  PM / devfreq: rockchip-dfi: Prepare for multiple users
  PM / devfreq: rockchip-dfi: give variable a better name
  PM / devfreq: rockchip-dfi: Add perf support
  PM / devfreq: rockchip-dfi: make register stride SoC specific
  PM / devfreq: rockchip-dfi: account for multiple DDRMON_CTRL registers
  PM / devfreq: rockchip-dfi: add support for RK3588
  dt-bindings: devfreq: event: convert Rockchip DFI binding to yaml
  dt-bindings: devfreq: event: rockchip,dfi: Add rk3568 support
  dt-bindings: devfreq: event: rockchip,dfi: Add rk3588 support
  arm64: dts: rockchip: rk3399: Enable DFI
  arm64: dts: rockchip: rk356x: Add DFI
  arm64: dts: rockchip: rk3588s: Add DFI

 .../bindings/devfreq/event/rockchip,dfi.yaml  |  84 ++
 .../bindings/devfreq/event/rockchip-dfi.txt   |  18 -
 .../rockchip,rk3399-dmc.yaml                  |   2 +-
 arch/arm64/boot/dts/rockchip/rk3399.dtsi      |   1 -
 arch/arm64/boot/dts/rockchip/rk356x.dtsi      |   7 +
 arch/arm64/boot/dts/rockchip/rk3588s.dtsi     |  16 +
 drivers/devfreq/event/rockchip-dfi.c          | 796 +++++++++++++++---
 drivers/devfreq/rk3399_dmc.c                  |  10 +-
 include/soc/rockchip/rk3399_grf.h             |   9 +-
 include/soc/rockchip/rk3568_grf.h             |  13 +
 include/soc/rockchip/rk3588_grf.h             |  18 +
 include/soc/rockchip/rockchip_grf.h           |  18 +
 12 files changed, 854 insertions(+), 138 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/devfreq/event/rockchip,dfi.yaml
 delete mode 100644 Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt
 create mode 100644 include/soc/rockchip/rk3568_grf.h
 create mode 100644 include/soc/rockchip/rk3588_grf.h
 create mode 100644 include/soc/rockchip/rockchip_grf.h

-- 
2.39.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

end of thread, other threads:[~2023-06-15 13:27 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24  8:31 [PATCH v5 00/25] Add perf support to the rockchip-dfi driver Sascha Hauer
2023-05-24  8:31 ` [PATCH v5 01/25] PM / devfreq: rockchip-dfi: Make pmu regmap mandatory Sascha Hauer
2023-06-13 16:21   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 02/25] PM / devfreq: rockchip-dfi: Embed desc into private data struct Sascha Hauer
2023-06-13 16:22   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 03/25] PM / devfreq: rockchip-dfi: use consistent name for " Sascha Hauer
2023-06-13 16:23   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 04/25] PM / devfreq: rockchip-dfi: Add SoC specific init function Sascha Hauer
2023-06-13 16:26   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 05/25] PM / devfreq: rockchip-dfi: dfi store raw values in counter struct Sascha Hauer
2023-06-13 16:28   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 06/25] PM / devfreq: rockchip-dfi: Use free running counter Sascha Hauer
2023-06-13 16:32   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 07/25] PM / devfreq: rockchip-dfi: introduce channel mask Sascha Hauer
2023-06-13 16:34   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 08/25] PM / devfreq: rk3399_dmc,dfi: generalize DDRTYPE defines Sascha Hauer
2023-06-13 16:39   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 09/25] PM / devfreq: rockchip-dfi: Clean up DDR type register defines Sascha Hauer
2023-06-13 16:46   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 10/25] PM / devfreq: rockchip-dfi: Add RK3568 support Sascha Hauer
2023-05-24  8:31 ` [PATCH v5 11/25] PM / devfreq: rockchip-dfi: Handle LPDDR2 correctly Sascha Hauer
2023-06-13 16:47   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 12/25] PM / devfreq: rockchip-dfi: Handle LPDDR4X Sascha Hauer
2023-06-13 16:48   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 13/25] PM / devfreq: rockchip-dfi: Pass private data struct to internal functions Sascha Hauer
2023-06-13 17:08   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 14/25] PM / devfreq: rockchip-dfi: Prepare for multiple users Sascha Hauer
2023-06-13 17:15   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 15/25] PM / devfreq: rockchip-dfi: give variable a better name Sascha Hauer
2023-06-13 17:16   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 16/25] PM / devfreq: rockchip-dfi: Add perf support Sascha Hauer
2023-06-14 13:29   ` Sebastian Reichel
2023-06-15 13:13   ` Sascha Hauer
2023-05-24  8:31 ` [PATCH v5 17/25] PM / devfreq: rockchip-dfi: make register stride SoC specific Sascha Hauer
2023-06-13 17:17   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 18/25] PM / devfreq: rockchip-dfi: account for multiple DDRMON_CTRL registers Sascha Hauer
2023-06-13 17:24   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 19/25] PM / devfreq: rockchip-dfi: add support for RK3588 Sascha Hauer
2023-06-13 16:16   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 20/25] dt-bindings: devfreq: event: convert Rockchip DFI binding to yaml Sascha Hauer
2023-06-13 23:39   ` Sebastian Reichel
2023-05-24  8:31 ` [PATCH v5 21/25] dt-bindings: devfreq: event: rockchip,dfi: Add rk3568 support Sascha Hauer
2023-05-24 19:42   ` Conor Dooley
2023-05-24  8:31 ` [PATCH v5 22/25] dt-bindings: devfreq: event: rockchip,dfi: Add rk3588 support Sascha Hauer
2023-05-24 19:37   ` Conor Dooley
2023-06-08 20:07   ` Rob Herring
2023-05-24  8:31 ` [PATCH v5 23/25] arm64: dts: rockchip: rk3399: Enable DFI Sascha Hauer
2023-05-24  8:31 ` [PATCH v5 24/25] arm64: dts: rockchip: rk356x: Add DFI Sascha Hauer
2023-05-24  8:31 ` [PATCH v5 25/25] arm64: dts: rockchip: rk3588s: " Sascha Hauer
2023-06-13 16:19   ` Sebastian Reichel
2023-06-14 13:40 ` [PATCH v5 00/25] Add perf support to the rockchip-dfi driver Sebastian Reichel
2023-06-14 14:19   ` Vincent Legoll
2023-06-14 15:27   ` Sebastian Reichel
2023-06-14 19:51     ` Vincent Legoll
2023-06-14 22:18       ` Sebastian Reichel
2023-06-15  6:56   ` Sascha Hauer
2023-06-15 13:27   ` Sascha Hauer

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