Skip to content

Add support for dynamic NPS switch

Lijo Lazar amd-gfx 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/27 patches 0 repliesNew
  2. v2 posting 1/22 of 7 patches 1 replySuperseded
  3. v17 patches 12 repliesSuperseded

Changes in v2 from the cover letter

Move NPS request check ahead of TOS reload requirement check (Feifei)

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/amdgpu: Add option to refresh NPS datadrivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c+55 -170 replies
2/7drm/amdgpu: Add PSP interface for NPS switchdrivers/gpu/drm/amd/amdgpu/amdgpu_psp.c drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h+37 -30 replies
3/7drm/amdgpu: Add gmc interface to request NPS modedrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +1 more+24 -00 replies
4/7drm/amdgpu: Add sysfs interfaces for NPS modedrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h+104 -160 replies
5/7drm/amdgpu: Place NPS mode request on unloaddrivers/gpu/drm/amd/amdgpu/amdgpu_drv.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +2 more+92 -00 replies
6/7drm/amdgpu: Check gmc requirement for reset on initdrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h drivers/gpu/drm/amd/amdgpu/soc15.c+19 -10 replies
7/7drm/amdgpu: Add NPS switch support for GC 9.4.3drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c+57 -00 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchFeifei XuRajneesh Bhardwaj
1/7R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7] Add support for dynamic NPS switch

This series adds supports for dynamic NPS switch on GC v9.4.3/9.4.4 SOC variants.

In order to do dynamic NPS switch a sysfs interface is provided to request a new NPS mode. If the device is part of a hive, all hive devices are required to be in the same NPS mode. Hence a hive device request is saved in a hive variable. For individual device, it's saved in a gmc block variable.

In order to do a NPS mode switch, the workflow is -

1) User places a requests through sysfs node.
2) User unloads the driver
3) During unload, driver checks for any pending NPS switch request. If any request is pending, it places the request to PSP FW.
4) For a hive, request is placed in one-go for all devices in the hive. If one of the requests fails, a request is placed again to revert to current NPS mode on the successful devices.
5) User reloads the driver.
6) On reload, driver checks if NPS switch is pending and initiates a mode-1 reset.
7) During resume after a reset, NPS ranges are read again from discovery table.
8) Driver detects the new NPS mode and makes a compatible compute partition mode switch if required.

v2:
Move NPS request check ahead of TOS reload requirement check (Feifei)

Lijo Lazar (7):
drm/amdgpu: Add option to refresh NPS data drm/amdgpu: Add PSP interface for NPS switch drm/amdgpu: Add gmc interface to request NPS mode drm/amdgpu: Add sysfs interfaces for NPS mode drm/amdgpu: Place NPS mode request on unload drm/amdgpu: Check gmc requirement for reset on init drm/amdgpu: Add NPS switch support for GC 9.4.3

 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  68 +++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       | 190 ++++++++++++++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h       |  19 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_nbio.h      |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c       |  25 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h       |   1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c      |  39 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h      |   5 +
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c         |  44 ++++
 drivers/gpu/drm/amd/amdgpu/nbio_v7_9.c        |  12 ++
 drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h       |  14 +-
 drivers/gpu/drm/amd/amdgpu/soc15.c            |   2 +
 14 files changed, 387 insertions(+), 36 deletions(-)
Signature · 1 line
2.25.1