mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] Add the MT8196 GPU temperature sensor
@ 2026-11-30 14:19 Alexandre Mergnat
  2026-11-30 14:19 ` [PATCH 1/3] dt-bindings: power: mt8196-gpufreq: Add #thermal-sensor-cells Alexandre Mergnat
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexandre Mergnat @ 2026-11-30 14:19 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, Nicolas Frattaroli, Ulf Hansson,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	linux-pm, Alexandre Mergnat, Moudy Ho

No mainline driver reports the temperature of the MT8196 GPU, so a
thermal zone cannot throttle the GPU when it heats up. This series
takes the temperature that the GPUEB, the microcontroller managing
the GPU power and frequency, reports to the kernel, and makes it a
thermal sensor that a device tree thermal zone can use.

The usual way to get this temperature would be to extend the driver of
the SoC thermal controller (LVTS) to its GPU sensors. This series uses
the value that the GPU firmware reports instead, because the firmware
already reads these sensors. Any read clears the flag that marks a new
measurement, so this flag cannot be shared by two readers: a read by
one makes the other miss that a new measurement is there. A prototype
Linux reader of these sensors often found the flag already cleared
without having read it. On the test board, the value that the firmware
reported stayed within one degree of the average of these sensors.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
Alexandre Mergnat (2):
      pmdomain: mediatek: mfg: Expose GPU temperature
      thermal/drivers/mediatek: Add GPUEB thermal driver

Moudy Ho (1):
      dt-bindings: power: mt8196-gpufreq: Add #thermal-sensor-cells

 .../bindings/power/mediatek,mt8196-gpufreq.yaml    |  4 ++
 drivers/pmdomain/mediatek/Kconfig                  |  1 +
 drivers/pmdomain/mediatek/mtk-mfg-pmdomain.c       | 29 ++++++++++++
 drivers/thermal/mediatek/Kconfig                   |  9 ++++
 drivers/thermal/mediatek/Makefile                  |  1 +
 drivers/thermal/mediatek/gpueb_thermal.c           | 52 ++++++++++++++++++++++
 include/linux/soc/mediatek/mtk-mfg.h               | 13 ++++++
 7 files changed, 109 insertions(+)
---
base-commit: f66469d9905b39d2c260a15d7d6db450f4db67c1
change-id: 20261115-mtk-mfg-thermal-9f4a7cc786ae

Best regards,
--  
Alexandre Mergnat <amergnat@baylibre.com>


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

end of thread, other threads:[~2026-11-30 15:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 14:19 [PATCH 0/3] Add the MT8196 GPU temperature sensor Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 1/3] dt-bindings: power: mt8196-gpufreq: Add #thermal-sensor-cells Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 2/3] pmdomain: mediatek: mfg: Expose GPU temperature Alexandre Mergnat
2026-11-30 14:19 ` [PATCH 3/3] thermal/drivers/mediatek: Add GPUEB thermal driver Alexandre Mergnat
2026-11-30 15:31   ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®