mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RFC 0/6] amdgpu: Avoid powering on the dGPU on vkEnumeratePhysicalDevices()
@ 2025-07-31  5:36 Philipp Zabel
  2025-07-31  5:36 ` [PATCH RFC 1/6] drm/amdgpu: don't wake up the GPU for some IOCTLs Philipp Zabel
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Philipp Zabel @ 2025-07-31  5:36 UTC (permalink / raw)
  To: Alex Deucher, Christian König, David Airlie, Simona Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Philipp Zabel, Philipp Zabel

This is an attempt at fixing amd#2295 [1]:

  On an AMD Rembrandt laptop with 680M iGPU and 6700S dGPU, calling
  vkEnumeratePhysicalDevices() wakes up the sleeping dGPU, even if all
  the application wants is to find and use the iGPU. This causes a delay
  of about 2 seconds on this system, followed by a few seconds of
  increased power draw until runtime PM turns the dGPU back off again.

[1] https://gitlab.freedesktop.org/drm/amd/-/issues/2295

Patch 1 avoids power up on some ioctls that don't need it.
Patch 2 avoids power up on open() by postponing fpriv initialization to
the first ioctl() that wakes up the dGPU.
Patches 3 and 4 add AMDGPU_INFO to the list of non-waking ioctls,
returning cached values for some queries.
Patch 5 works around an explicit register access from libdrm.
Patch 6 shorts out the syncobj ioctls while fpriv is still
uninitialized. This avoids waking up the dGPU during Vulkan syncobj
feature detection.

regards
Philipp

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
Alex Deucher (1):
      drm/amdgpu: don't wake up the GPU for some IOCTLs

Philipp Zabel (5):
      drm/amdgpu: don't wake up the GPU when opening the device
      drm/amdgpu: don't query xclk in AMDGPU_INFO_DEV_INFO
      drm/amdgpu: don't wake up the GPU for some AMDGPU_INFO queries
      drm/amdgpu: don't wake up the GPU for mmGB_ADDR_CONFIG register read
      drm/amdgpu: don't wake up the GPU for syncobj feature detection

 drivers/gpu/drm/amd/amdgpu/amdgpu.h         |   5 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c  |   2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c     |  80 +++++++++++++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c  |   3 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     | 137 +++++++++++++++++++++-------
 6 files changed, 194 insertions(+), 36 deletions(-)
---
base-commit: 6ac55eab4fc41e0ea80f9064945e4340f13d8b5c
change-id: 20250730-b4-dont-wake-next-17fc02114331

Best regards,
--  
Philipp Zabel <philipp.zabel@gmail.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-08-20  7:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-31  5:36 [PATCH RFC 0/6] amdgpu: Avoid powering on the dGPU on vkEnumeratePhysicalDevices() Philipp Zabel
2025-07-31  5:36 ` [PATCH RFC 1/6] drm/amdgpu: don't wake up the GPU for some IOCTLs Philipp Zabel
2025-07-31  5:36 ` [PATCH RFC 2/6] drm/amdgpu: don't wake up the GPU when opening the device Philipp Zabel
2025-07-31  5:36 ` [PATCH RFC 3/6] drm/amdgpu: don't query xclk in AMDGPU_INFO_DEV_INFO Philipp Zabel
2025-07-31  5:36 ` [PATCH RFC 4/6] drm/amdgpu: don't wake up the GPU for some AMDGPU_INFO queries Philipp Zabel
2025-07-31  5:36 ` [PATCH RFC 5/6] drm/amdgpu: don't wake up the GPU for mmGB_ADDR_CONFIG register read Philipp Zabel
2025-07-31 19:38   ` Alex Deucher
     [not found]     ` <CA+gwMcc41Hh=or7NLMnG++miHj_dNLZ04iFYdf=U7_LLG1gSZw@mail.gmail.com>
2025-08-01 15:27       ` Alex Deucher
2025-07-31  5:36 ` [PATCH RFC 6/6] drm/amdgpu: don't wake up the GPU for syncobj feature detection Philipp Zabel
2025-08-06  8:58 ` [PATCH RFC 0/6] amdgpu: Avoid powering on the dGPU on vkEnumeratePhysicalDevices() Christian König
2025-08-06 10:15   ` Philipp Zabel
2025-08-06 13:17     ` Christian König
2025-08-20  7:42       ` Pierre-Eric Pelloux-Prayer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®