This patch series reworks the runtime_pm system for ioctls, cs, and
open/close calls to allow a few tools such as AMD-SMI to function
without waking up the GPU.

v2:
Refactor patch "drm/amdgpu: use pm_runtime_resume_and_get
amdgpu_gem_create_ioctl" to use a conditional guard instead as suggested by
Kevin and Christian.

Change the descriptions for several patches to fit kernel conventions as
suggested by Christian.

v3:
Fixed the typo in drm/amdgpu: use pm_runtime_resume_and_get for ctx ioctl.

Reworked patch "drm/amdgpu: rework runtime pm management for cs" to
take the pm_ref on a cs_ioctl instead of a job.

Reworked patch "drm/amdgpu: push down runtime pm handling in
amdgpu_gem_create_ioctl" to use a conditional guard.

Reworked patch "drm/amdgpu: handle runtime pm in amdgpu_gem_userptr_ioctl"
to call the pm_runtime_resume before the BO is reserved.

Split patch "drm/amdgpu: defer GPU resume from open/close to first use"
into 3 different patches:

drm/amdgpu: drop vm->generation initalization and root PD clearing
drm/amdgpu: remove redundant amdgpu_vm_bo_update() call
drm/amdgpu: defer GPU resume from open/close to first use

Removed redundant amdgpu_vm_bo_update() call in amdgpu_seq64_map as
amdgpu_cs_vm_handling() already handles it.

Editted patch "drm/amdgpu: defer GPU resume from open/close to first
use" to change the pm_ref parameter into !!pm_ref so that it would be
converted into a boolean.

Set the preferred_domains and allowed_domains after the root PD is created
in amdgpu_vm_pt_create(). This is to ensure later on in stack, the kernel
will notice the root PD is not in its preferred domain and will set it to
evicted. Setting the root PD to evicted will move it back into its
preferred domain on the next best possible iteration.

All changes were suggested by Christian.


Pierre-Eric Pelloux-Prayer (7):
  drm/amdgpu: use pm_runtime_resume_and_get amdgpu_gem_create_ioctl
  drm/amdgpu: use pm_runtime_resume_and_get for ctx ioctl
  drm/amdgpu: rework runtime pm management for cs
  drm/amdgpu: push down runtime pm handling in amdgpu_gem_create_ioctl
  drm/amdgpu: handle runtime pm in amdgpu_gem_userptr_ioctl
  drm/amdgpu: prevent suspend in fault handler
  drm/amdgpu: get rid of amdgpu_drm_ioctl

Shahyan Soltani (3):
  drm/amdgpu: drop vm->generation initalization and root PD clearing
  drm/amdgpu: remove redundant amdgpu_vm_bo_update() call
  drm/amdgpu: defer GPU resume from open/close to first use

 drivers/gpu/drm/amd/amdgpu/Makefile        |  1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c     |  7 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c    | 10 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 23 +----------
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.h    |  6 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c    | 24 ++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c  | 45 ----------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    | 16 ++++----
 drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c  |  7 ----
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c     |  8 +---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h     |  5 ++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c  |  7 +++-
 13 files changed, 61 insertions(+), 100 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c

-- 
2.55.0

Reply via email to