[PATCH v2 0/3] drm/nouveau: expose accurate read-only PWM telemetry on Pascal

From: Jakub Ludera via B4 Relay

Date: Sun Dec 06 2026 - 09:38:14 EST


On Pascal GPUs (such as GP106), gp100_therm currently lacks PWM callbacks,
causing nouveau's hwmon interface to fall back to a dummy fan
implementation that reports a hardcoded 100% duty cycle (pwm1 = 255)
while still exposing writable pwm1 and pwm1_enable attributes that fail
with -EINVAL when written because fan management is owned by the PMU.

This series guards thermal fanboost and separates Volta/Turing therm
ops from Pascal, wires up the GM107-compatible PWM callbacks in
gp100_therm so hwmon reports actual hardware fan PWM telemetry on
Pascal, and updates nouveau_hwmon to hide pwm1_enable and expose pwm1
as read-only (0444) when the PMU controls the fan.

Tested on an NVIDIA GeForce GTX 1060 6GB (GP106):
- /sys/class/hwmon/hwmonX/pwm1 now reflects live fan PWM duty cycle
and has permissions 0444 (-r--r--r--).
- /sys/class/hwmon/hwmonX/pwm1_enable is hidden on PMU-controlled GPUs.

Signed-off-by: Jakub Ludera <jakub_ludera@xxxxxxx>
---
Changes in v2:
- Add a prerequisite patch guarding NVKM_THERM_THRS_FANBOOST when
nvkm_pmu_fan_controlled() is true, and defining gv100_therm_new()
inside gp100.c (as GV100 has no separate implementation file) for
Volta (GV100) and Turing (TU102-TU117) so Pascal PWM register offsets
(0x10eb10-0x10eb24) are not applied to Volta+ hardware.
- Drop gt215_therm_fan_sense from gp100_therm since GP10x uses the PMGR
tachometer interface rather than NV_PDISP_SOR_PWM/0x10eb20, and fix
the commit message description of nvkm_fantog_create().
- Fall back to NVKM_THERM_CTRL_NONE (0) in nvkm_therm_oneinit() when
NVKM_THERM_CTRL_AUTO fails, and check nvkm_pmu_fan_controlled() in
nouveau_pwm_is_visible() instead of mode < 0 so manual fan control
remains available on legacy GPUs without an internal thermal sensor.
- Thanks to Sashiko AI review for catching these issues in v1.

- Link to v1: https://patch.msgid.link/20261206-fix-gp100-hwmon-pwm-v1-0-62f07d557329@xxxxxxx

To: Lyude Paul <lyude@xxxxxxxxxx>
To: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
To: Maxime Ripard <mripard@xxxxxxxxxx>
To: Thomas Zimmermann <tzimmermann@xxxxxxx>
To: David Airlie <airlied@xxxxxxxxx>
To: Simona Vetter <simona@xxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: nouveau@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Jakub Ludera (3):
drm/nouveau/therm: guard fanboost against PMU control and split gv100_therm
drm/nouveau/therm/gp100: wire up fan PWM callbacks on Pascal
drm/nouveau/hwmon: hide pwm1_enable and make pwm1 read-only when PMU controls fan

drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 +
drivers/gpu/drm/nouveau/nouveau_hwmon.c | 7 ++++++-
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 12 ++++++------
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 3 ++-
drivers/gpu/drm/nouveau/nvkm/subdev/therm/gm107.c | 8 ++++----
drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 20 ++++++++++++++++++++
drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h | 5 +++++
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c | 4 +++-
8 files changed, 47 insertions(+), 13 deletions(-)
---
base-commit: b5a1ab58fb6535064d79c26f3d53936e88769339
change-id: 20261206-fix-gp100-hwmon-pwm-2aeb8cca21a6

Best regards,
--
Jakub Ludera <jakub_ludera@xxxxxxx>