[Nouveau] [RFC PATCH 00/29] Current State of my clk patches

Karol Herbst karolherbst at gmail.com
Fri Sep 15 17:11:00 UTC 2017

Just wanted to post updated versions of my last series/patches. Reviews

It would be also nice if we agree on features I should focus upstreaming, so
that this work can be better splitted or reordered.

Sadly most of my patches depend on the rather big clk subdev rework and I think
those patches shows best, why I think this rework is actually needed and makes
things much easier to add later on.

Feature overview:
  1- 3: Hwmon fixes on suspended device
  4- 8: Clk subdev rework to decouple current and expected clock states
        Fix reclocking while suspended
     9: Restore clocks on Suspend
    10: Fix reclocking while going into suspend
    11: Fix reclocking while suspending
 12-14: Thermal daemon triggers reclocks on temperature change when needed
          includes volt updates and dropping cstates according to the vbios
 15-17: Thermal throttling
    18: Don't do full reclocks when only parts need to be updated
 19-20: Hacky Workaround for enabling Maxwell2 reclocking (hidden behind module parameter)
 21-23: debugfs file to change boost mode
 24-29: Parse battery vpstate to throttle clocks when system is running on battery

Karol Herbst (29):
  therm: split return code and value in nvkm_get_temp
  hwmon: properly check for errors
  subdev/volt/gk104: return error when read fails
  clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
  clk: Remove dstate
  clk: Make pstate a pointer to nvkm_pstate
  clk: Hold information about the current cstate status
  clk: We should pass the pstate id around not the index in the list
  clk: Set clocks to pre suspend state after suspend
  core/device: Move therm behind clk
  debugfs: Wake up GPU before doing any reclocking
  therm: Don't cancel the timer
  therm: Move the temp readout into the alarm
  therm: Trigger reclock in temperature daemon
  bios: add thermal policies table
  clk: parse thermal policies for throttling thresholds
  clk: thermal throttling
  clk: Only do partial reclocks as required
  secboot/acr352: reset PMU after secboot
  device: enable clk for Maxwell2
  clk: Save the max clock we can set
  nvif: Add boost info and set operations
  debugfs: Add boost interface to change the boost_mode
  bios/vpstate: there are some fermi vbios with no boost or tdp entry
  bios/vpstate: parse max battery id
  clk: refactor the base and boost clock limits so that we can limit
    pstates as well
  clk: implement limiting pstates just like we do for cstates
  clk: move the switch out of the loop in nvkm_cstate_valid
  clk: limit clocks on battery

 drm/nouveau/include/nvif/if0001.h                  |  15 +
 drm/nouveau/include/nvkm/core/device.h             |   2 +-
 .../include/nvkm/subdev/bios/thermal_policies.h    |  27 ++
 drm/nouveau/include/nvkm/subdev/bios/vpstate.h     |   1 +
 drm/nouveau/include/nvkm/subdev/clk.h              |  23 +-
 drm/nouveau/include/nvkm/subdev/therm.h            |   3 +-
 drm/nouveau/nouveau_debugfs.c                      |  90 ++++-
 drm/nouveau/nouveau_hwmon.c                        |  48 ++-
 drm/nouveau/nvkm/engine/device/base.c              |   3 +
 drm/nouveau/nvkm/engine/device/ctrl.c              |  66 +++-
 drm/nouveau/nvkm/subdev/bios/Kbuild                |   1 +
 drm/nouveau/nvkm/subdev/bios/thermal_policies.c    |  81 +++++
 drm/nouveau/nvkm/subdev/bios/vpstate.c             |  13 +-
 drm/nouveau/nvkm/subdev/clk/base.c                 | 375 +++++++++++++++------
 drm/nouveau/nvkm/subdev/clk/gk104.c                |  10 +-
 drm/nouveau/nvkm/subdev/pmu/gk20a.c                |  18 +-
 drm/nouveau/nvkm/subdev/secboot/acr_r352.c         |  13 +
 drm/nouveau/nvkm/subdev/therm/base.c               |  59 ++--
 drm/nouveau/nvkm/subdev/therm/g84.c                |  11 +-
 drm/nouveau/nvkm/subdev/therm/gp100.c              |   9 +-
 drm/nouveau/nvkm/subdev/therm/nv40.c               |   9 +-
 drm/nouveau/nvkm/subdev/therm/nv50.c               |   9 +-
 drm/nouveau/nvkm/subdev/therm/priv.h               |   4 +-
 drm/nouveau/nvkm/subdev/therm/temp.c               |  16 +-
 drm/nouveau/nvkm/subdev/volt/base.c                |   3 +
 drm/nouveau/nvkm/subdev/volt/gk104.c               |   7 +-
 26 files changed, 723 insertions(+), 193 deletions(-)
 create mode 100644 drm/nouveau/include/nvkm/subdev/bios/thermal_policies.h
 create mode 100644 drm/nouveau/nvkm/subdev/bios/thermal_policies.c


More information about the Nouveau mailing list