Skip to content

Add fine-grain temperature reporting

Jeremy Cline dri-devel lkml nouveau 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 4 repliesIn review
  2. v11 patch 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/nouveau: return temperatures in temp_get() via parameterdrivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h drivers/gpu/drm/nouveau/nouveau_hwmon.c drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +6 more+62 -404 replies
2/2drm/nouveau: Add fine-grain temperature reportingdrivers/gpu/drm/nouveau/include/nvkm/subdev/bios/therm.h drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h drivers/gpu/drm/nouveau/nouveau_hwmon.c +6 more+59 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] Add fine-grain temperature reporting

Hi folks,

This series adjusts the temp_get() interface in the thermal functions to report milli-degrees, and additionally alters the way errors are reported. As I went through all the users and implementations I realized that Pascal's temp_get() implementation didn't include turning negative temperatures to 0 like other implementations, so I separated error reporting from the temperature in the API.

Couple of things I'm on the fence about here:

* I allowed the nvkm_therm_temp_get() functions to accept NULL as a way to check if temperature reading is available rather than adding a separate helper, but was torn about whether this is clearer than a separate helper function.

* I added a WARN_ON in places that previously called nvkm_therm_temp_get() and didn't check the return value for an error. This may not be a reasonable error handling method.

Jeremy Cline (2):
drm/nouveau: return temperatures in temp_get() via parameter drm/nouveau: Add fine-grain temperature reporting

 .../nouveau/include/nvkm/subdev/bios/therm.h  | 13 +++++++++
 .../drm/nouveau/include/nvkm/subdev/therm.h   | 28 ++++++++++++++++++-
 drivers/gpu/drm/nouveau/nouveau_hwmon.c       | 12 ++++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/base.c  | 28 +++++++++++++++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/g84.c   | 11 ++++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 11 ++++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/nv40.c  |  9 ++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/nv50.c  |  9 ++----
 .../gpu/drm/nouveau/nvkm/subdev/therm/priv.h  | 17 +++++++++--
 .../gpu/drm/nouveau/nvkm/subdev/therm/temp.c  | 12 +++++---
 10 files changed, 110 insertions(+), 40 deletions(-)
Signature · 1 line
2.26.2