LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [Patch v5 0/6] Introduce LMh driver for Qualcomm SoCs
@ 2021-08-09 19:15 Thara Gopinath
  2021-08-09 19:15 ` [Patch v5 1/6] firmware: qcom_scm: Introduce SCM calls to access LMh Thara Gopinath
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Thara Gopinath @ 2021-08-09 19:15 UTC (permalink / raw)
  To: agross, bjorn.andersson, rui.zhang, daniel.lezcano, viresh.kumar,
	rjw, robh+dt
  Cc: steev, tdas, mka, linux-arm-msm, linux-pm, linux-kernel, devicetree

Limits Management Hardware(LMh) is a hardware infrastructure on some
Qualcomm SoCs that can enforce temperature and current limits as programmed
by software for certain IPs like CPU. On many newer SoCs LMh is configured
by firmware/TZ and no programming is needed from the kernel side. But on
certain SoCs like sdm845 the firmware does not do a complete programming of
the h/w block. On such SoCs kernel software has to explicitly set up the
temperature limits and turn on various monitoring and enforcing algorithms
on the hardware.

Introduce support for enabling and programming various limit settings and
monitoring capabilities of Limits Management Hardware(LMh) associated with
cpu clusters. Also introduce support in cpufreq hardware driver to monitor
the interrupt associated with cpu frequency throttling so that this
information can be conveyed to the schdeuler via thermal pressure
interface.

With this patch series following cpu performance improvement(30-70%) is
observed on sdm845. The reasoning here is that without LMh being programmed
properly from the kernel, the default settings were enabling thermal
mitigation for CPUs at too low a temperature (around 70-75 degree C).  This
in turn meant that many a time CPUs were never actually allowed to hit the
maximum possible/required frequencies.

UnixBench whets and dhry (./Run whets dhry)
System Benchmarks Index Score

                Without LMh Support             With LMh Support
1 copy test     1353.7                          1773.2

8 copy tests    4473.6                          7402.3

Sysbench cpu
sysbench cpu --threads=8 --time=60 --cpu-max-prime=100000 run

                Without LMh Support             With LMh Support
Events per
second                  355                             614

Avg Latency(ms)         21.84                           13.02

v4->v5:
	- Rebased to v5.14-rc5.

v3->v4:
        - Rebased to v5.14-rc2.

v2->v3:
        - Included patch adding dt binding documentation for LMh nodes.
        - Rebased to v5.13

Thara Gopinath (6):
  firmware: qcom_scm: Introduce SCM calls to access LMh
  thermal: qcom: Add support for LMh driver
  cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support
  arm64: dts: qcom: sdm45: Add support for LMh node
  arm64: dts: qcom: sdm845: Remove cpufreq cooling devices for CPU
    thermal zones
  dt-bindings: thermal: Add dt binding for QCOM LMh

 .../devicetree/bindings/thermal/qcom-lmh.yaml |  82 +++++++
 arch/arm64/boot/dts/qcom/sdm845.dtsi          | 162 ++----------
 drivers/cpufreq/qcom-cpufreq-hw.c             | 147 +++++++++++
 drivers/firmware/qcom_scm.c                   |  58 +++++
 drivers/firmware/qcom_scm.h                   |   4 +
 drivers/thermal/qcom/Kconfig                  |  10 +
 drivers/thermal/qcom/Makefile                 |   1 +
 drivers/thermal/qcom/lmh.c                    | 232 ++++++++++++++++++
 include/linux/qcom_scm.h                      |  14 ++
 9 files changed, 574 insertions(+), 136 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/thermal/qcom-lmh.yaml
 create mode 100644 drivers/thermal/qcom/lmh.c

-- 
2.25.1


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

end of thread, other threads:[~2021-08-31 14:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 19:15 [Patch v5 0/6] Introduce LMh driver for Qualcomm SoCs Thara Gopinath
2021-08-09 19:15 ` [Patch v5 1/6] firmware: qcom_scm: Introduce SCM calls to access LMh Thara Gopinath
2021-08-17 13:17   ` Daniel Lezcano
2021-08-17 14:07     ` Bjorn Andersson
2021-08-17 14:08       ` Daniel Lezcano
2021-08-09 19:16 ` [Patch v5 2/6] thermal: qcom: Add support for LMh driver Thara Gopinath
2021-08-21  9:41   ` Daniel Lezcano
2021-08-23 15:05     ` Bjorn Andersson
2021-08-23 15:57       ` Daniel Lezcano
2021-08-31 14:52         ` Thara Gopinath
2021-08-09 19:16 ` [Patch v5 3/6] cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support Thara Gopinath
2021-08-10  2:47   ` Viresh Kumar
2021-08-11 11:27     ` Thara Gopinath
2021-08-18  3:37   ` Viresh Kumar
2021-08-09 19:16 ` [Patch v5 4/6] arm64: dts: qcom: sdm45: Add support for LMh node Thara Gopinath
2021-08-09 19:16 ` [Patch v5 5/6] arm64: dts: qcom: sdm845: Remove cpufreq cooling devices for CPU thermal zones Thara Gopinath
2021-08-09 19:16 ` [Patch v5 6/6] dt-bindings: thermal: Add dt binding for QCOM LMh Thara Gopinath
2021-08-09 19:16 ` Thara Gopinath
2021-08-17 18:56   ` Rob Herring

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