Updated State of my clk patches

Submitted by Karol Herbst on Nov. 17, 2017, 12:04 a.m.

Details

Reviewer None
Submitted Nov. 17, 2017, 12:04 a.m.
Last Updated Nov. 17, 2017, 12:05 a.m.
Revision 1

Cover Letter(s)

Revision 1
      Last update here: https://lists.freedesktop.org/archives/nouveau/2017-September/028848.html

Basically big cleanup, reordering, simplifications and some renaming to make
the code easier to read and to review. I also moved some bugfixes to the front
so they can be merged prior the other patches.

There was also a bug related to the therm daemon triggering a pstate change
leading to PMU lockups, because the timer wasn't disabled on fini.

I think we are getting close with this and hope we can merge this soon.

Karol Herbst (32):
  bios/vpstate: There are some fermi vbios with no boost or tdp entry
  debugfs: Wake up GPU before doing any reclocking
  therm: Split return code and value in nvkm_get_temp
  hwmon: Properly check for errors
  clk: Improve names of pstate/cstate related variables and fields
  clk: Add NVKM_CLK_PSTATE_BOOT
  clk: Rename NVKM_CLK_CSTATE_HIGHEST to NVKM_CLK_CSTATE_AUTO
  clk: Rename nvkm_clk.states to pstates
  clk: Rename nvkm_pstate.list to cstates
  clk: Remove dstate
  clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
  clk: Use list_for_each_entry_from_reverse in nvkm_cstate_find_best
  clk: We should pass the pstate id around not the index in the list
  clk: Hold information about the current cstate status
  clk: Refactor the base and boost clock limits so that we can limit
    pstates
  therm: Move the temp readout into nvkm_therm_update
  core/device: Move therm behind clk
  therm: Trigger reclock in temperature daemon
  bios: Add thermal policies table
  therm: Cancel the timer only in fini
  clk: Parse thermal policies for throttling thresholds
  clk: Thermal throttling
  clk: Skip unchanging parts of the reclock
  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: Parse max battery id
  clk: Implement limiting pstates just like we do for cstates
  clk: Limit clocks on battery
  secboot/acr352: Reset PMU after secboot
  device: Enable clk for Maxwell2
  clk: Add trace message when setting a new cstate

 drm/nouveau/include/nvif/if0001.h                  |  15 +
 drm/nouveau/include/nvkm/core/device.h             |   2 +-
 drm/nouveau/include/nvkm/subdev/bios/boost.h       |   2 +-
 drm/nouveau/include/nvkm/subdev/bios/perf.h        |   2 +-
 .../include/nvkm/subdev/bios/thermal_policies.h    |  25 ++
 drm/nouveau/include/nvkm/subdev/bios/vpstate.h     |   1 +
 drm/nouveau/include/nvkm/subdev/clk.h              |  40 +-
 drm/nouveau/include/nvkm/subdev/therm.h            |   2 +-
 drm/nouveau/nouveau_debugfs.c                      |  99 ++++-
 drm/nouveau/nouveau_hwmon.c                        |  48 ++-
 drm/nouveau/nvkm/engine/device/base.c              |   3 +
 drm/nouveau/nvkm/engine/device/ctrl.c              |  73 +++-
 drm/nouveau/nvkm/subdev/bios/Kbuild                |   1 +
 drm/nouveau/nvkm/subdev/bios/boost.c               |  11 +-
 drm/nouveau/nvkm/subdev/bios/perf.c                |   2 +-
 drm/nouveau/nvkm/subdev/bios/thermal_policies.c    |  81 ++++
 drm/nouveau/nvkm/subdev/bios/vpstate.c             |  13 +-
 drm/nouveau/nvkm/subdev/clk/base.c                 | 427 ++++++++++++++-------
 drm/nouveau/nvkm/subdev/clk/gk104.c                |  10 +-
 drm/nouveau/nvkm/subdev/clk/gk20a.c                |   4 +-
 drm/nouveau/nvkm/subdev/pmu/gk20a.c                |   9 +-
 drm/nouveau/nvkm/subdev/secboot/acr_r352.c         |  14 +
 drm/nouveau/nvkm/subdev/therm/base.c               |  52 ++-
 drm/nouveau/nvkm/subdev/therm/g84.c                |  13 +-
 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 +
 lib/include/nvif/list.h                            |   5 +
 31 files changed, 758 insertions(+), 246 deletions(-)
 create mode 100644 drm/nouveau/include/nvkm/subdev/bios/thermal_policies.h
 create mode 100644 drm/nouveau/nvkm/subdev/bios/thermal_policies.c
    

Revisions

Patches download mbox

# Name Submitter State A F R T
[01/32] bios/vpstate: There are some fermi vbios with no boost or tdp entry Karol Herbst New
[02/32] debugfs: Wake up GPU before doing any reclocking Karol Herbst New
[03/32] therm: Split return code and value in nvkm_get_temp Karol Herbst New
[04/32] hwmon: Properly check for errors Karol Herbst New 1
[05/32] clk: Improve names of pstate/cstate related variables and fields Karol Herbst New
[06/32] clk: Add NVKM_CLK_PSTATE_BOOT Karol Herbst New
[07/32] clk: Rename NVKM_CLK_CSTATE_HIGHEST to NVKM_CLK_CSTATE_AUTO Karol Herbst New
[08/32] clk: Rename nvkm_clk.states to pstates Karol Herbst New
[09/32] clk: Rename nvkm_pstate.list to cstates Karol Herbst New
[10/32] clk: Remove dstate Karol Herbst New 2
[11/32] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it Karol Herbst New
[12/32] clk: Use list_for_each_entry_from_reverse in nvkm_cstate_find_best Karol Herbst New
[13/32] clk: We should pass the pstate id around not the index in the list Karol Herbst New 1
[14/32] clk: Hold information about the current cstate status Karol Herbst New 1 1
[15/32] clk: Refactor the base and boost clock limits so that we can limit pstates Karol Herbst New
[16/32] therm: Move the temp readout into nvkm_therm_update Karol Herbst New
[17/32] core/device: Move therm behind clk Karol Herbst New
[18/32] therm: Trigger reclock in temperature daemon Karol Herbst New 2
[19/32] bios: Add thermal policies table Karol Herbst New 1
[20/32] therm: Cancel the timer only in fini Karol Herbst New 1
[21/32] clk: Parse thermal policies for throttling thresholds Karol Herbst New
[22/32] clk: Thermal throttling Karol Herbst New 1
[23/32] clk: Skip unchanging parts of the reclock Karol Herbst New
[24/32] clk: Save the max clock we can set Karol Herbst New 1
[25/32] nvif: Add boost info and set operations Karol Herbst New 1
[26/32] debugfs: Add boost interface to change the boost_mode Karol Herbst New 1
[27/32] bios/vpstate: Parse max battery id Karol Herbst New
[28/32] clk: Implement limiting pstates just like we do for cstates Karol Herbst New
[29/32] clk: Limit clocks on battery Karol Herbst New
[30/32] secboot/acr352: Reset PMU after secboot Karol Herbst New
[31/32] device: Enable clk for Maxwell2 Karol Herbst New
[32/32] clk: Add trace message when setting a new cstate Karol Herbst New