All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 00/10] Add CWSR support to user queues
@ 2025-12-03 12:54 Lijo Lazar
  2025-12-03 12:54 ` [RFC PATCH v3 01/10] drm/amdgpu: Add helper function to get xcc count Lijo Lazar
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Lijo Lazar @ 2025-12-03 12:54 UTC (permalink / raw)
  To: amd-gfx; +Cc: Hawking.Zhang, Alexander.Deucher, Christian.Koenig, Jesse.Zhang

This series ports some of CWSR functions from KFD to KGD side for userqueues.

Things which are part of this series -

v1:
  Allocation of TBA/TMA regions for first level handler. First level handler is always from driver.
  Presently, this takes care of only dGPU allocations and is TBD for APUs. Backend to add second
  level handler is added, but there is no IOCTL provided yet. TBA is allocated only once and TMA is
  allocated per VM. It's tracked by a cwsr object which is maintained in userqueue manager.

  Adds save area and control stack calculations to KGD side. Also, support to specify save/restore
  area params while creating user queues. TBD:IOCTL parameters need to be modified to specify save
  area params. Also, need to confirm size calculations with multi-xcc and obtain the number of XCCs
  used by a userqueue manager.
 
v2:
  Remove association of cwsr with user queue manager (Christian)
  Add ioctl support to query cwsr size, set cwsr parameters for user queues and set second level
  handler.
  TBD: Handle level1 trap handler allocation for APUs.

v3:
  Removed 'TBD: Handle level1 trap handler allocation for APUs' (confirmed that APUs also use
  the same path).
  Rebase against amd-staging-drm-next.
  Fixes for issues reported by Jesse Zhang:
    Keep 2 pages for cwsr handler (TBA) and 1 page for TMA.
    Add cwsr_enabled in addition to cwsr_supported and use it for NULL pointer issues.

Lijo Lazar (10):
  drm/amdgpu: Add helper function to get xcc count
  drm/amdgpu: Add cwsr functions
  drm/amdgpu: Fill cwsr save area details
  drm/amdgpu: Add user save area params validation
  drm/amdgpu: Add cwsr to device init/fini sequence
  drm/amdgpu: Add first level cwsr handler to userq
  drm/amdgpu: Add user save area params to mqd input
  drm/amdgpu: Add ioctl to get cwsr details
  drm/amdgpu: Add ioctl support for cwsr params
  drm/amdgpu: Add ioctl to set level2 handler

 drivers/gpu/drm/amd/amdgpu/Makefile        |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  10 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cwsr.c   | 598 +++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_cwsr.h   |  91 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   8 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    |   2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c    |  29 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c  |  24 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h  |   5 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h     |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h    |  22 +
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c     |  14 +
 drivers/gpu/drm/amd/amdgpu/mes_userqueue.c |  27 +
 include/uapi/drm/amdgpu_drm.h              |  56 ++
 14 files changed, 887 insertions(+), 3 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_cwsr.c
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_cwsr.h

-- 
2.49.0


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

end of thread, other threads:[~2026-01-05  6:34 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-03 12:54 [RFC PATCH v3 00/10] Add CWSR support to user queues Lijo Lazar
2025-12-03 12:54 ` [RFC PATCH v3 01/10] drm/amdgpu: Add helper function to get xcc count Lijo Lazar
2025-12-16 16:32   ` Alex Deucher
2025-12-03 12:54 ` [RFC PATCH v3 02/10] drm/amdgpu: Add cwsr functions Lijo Lazar
2025-12-04  7:36   ` Krzysztof Kozlowski
2025-12-04  8:03     ` Lazar, Lijo
2025-12-04  8:06       ` Krzysztof Kozlowski
2025-12-04  8:08         ` Krzysztof Kozlowski
2025-12-04  8:08         ` Lazar, Lijo
2025-12-16 16:38   ` Alex Deucher
2025-12-22  5:38   ` Zhang, Jesse(Jie)
2025-12-03 12:54 ` [RFC PATCH v3 03/10] drm/amdgpu: Fill cwsr save area details Lijo Lazar
2025-12-16 16:40   ` Alex Deucher
2025-12-03 12:54 ` [RFC PATCH v3 04/10] drm/amdgpu: Add user save area params validation Lijo Lazar
2025-12-16 16:15   ` Alex Deucher
2025-12-03 12:54 ` [RFC PATCH v3 05/10] drm/amdgpu: Add cwsr to device init/fini sequence Lijo Lazar
2025-12-16 16:41   ` Alex Deucher
2025-12-03 12:54 ` [RFC PATCH v3 06/10] drm/amdgpu: Add first level cwsr handler to userq Lijo Lazar
2025-12-16 16:43   ` Alex Deucher
2025-12-19  8:37   ` Zhang, Jesse(Jie)
2025-12-03 12:54 ` [RFC PATCH v3 07/10] drm/amdgpu: Add user save area params to mqd input Lijo Lazar
2025-12-03 12:54 ` [RFC PATCH v3 08/10] drm/amdgpu: Add ioctl to get cwsr details Lijo Lazar
2025-12-16 16:55   ` Alex Deucher
2026-01-05  6:10     ` Lazar, Lijo
2025-12-03 12:55 ` [RFC PATCH v3 09/10] drm/amdgpu: Add ioctl support for cwsr params Lijo Lazar
2025-12-16 16:30   ` Alex Deucher
2026-01-05  6:33     ` Lazar, Lijo
2025-12-03 12:55 ` [RFC PATCH v3 10/10] drm/amdgpu: Add ioctl to set level2 handler Lijo Lazar
2025-12-16 16:26   ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.