Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Optimise suspend handling for CCS igpu platforms
@ 2026-11-06 10:16 Matthew Auld
  2026-11-06 10:16 ` [PATCH 1/2] drm/xe: only evict CCS buffers from TT on iGPU Matthew Auld
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Matthew Auld @ 2026-11-06 10:16 UTC (permalink / raw)
  To: intel-xe

CCS lives in stolen memory which in turn lives somewhere in RAM.
And since it's stolen memory the driver is responsible for doing any
save/restore as part of s4/hibernation. But for other suspend events it
should persist.

But currently we evict ALL TT userspace buffers on ANY suspend event
for igpu platforms with CCS. So here all user buffers need to be
re-validated and rebound on the first exec() call after wakeup, in
addition to a bunch of pointless GPU work to save and restore the CCS
state. Also, since we actively purge anything marked with DONTNEED
during eviction this will vaporise the Mesa buffer pool/cache. And this
currently happens on every s2idle or s3 event, which is the default in
most distros.

Given this, there are two angles to make this optimal for our suspend
handling:

 1. We should limit eviction only to suspected CCS buffers. If Mesa
    tagged the buffer with NO_COMP or we can deduce that there is no
    compression we can skip the buffer.

 2. We can limit eviction for CCS user buffers, for any < S4 suspend
    event. In theory only when RAM is powered down do we need to worry
    about saving CCS (same with GGTT). For s2idle etc. this flow is now
    a noop in terms of eviction.

This should be a significant improvement on lnl/ptl etc.

VLK-103395

---
Matthew Auld (2):
      drm/xe: only evict CCS buffers from TT on iGPU
      drm/xe/pm: skip BO eviction on iGPU for non-hibernation sleep

 drivers/gpu/drm/xe/xe_bo_evict.c | 64 +++++++++++++++++++++++++++++++++-------
 drivers/gpu/drm/xe/xe_pci.c      | 21 +++++++++++--
 drivers/gpu/drm/xe/xe_pm.c       | 26 ++++++++++++----
 drivers/gpu/drm/xe/xe_pm.h       |  2 +-
 4 files changed, 93 insertions(+), 20 deletions(-)
---
base-commit: 7797f00bc4da28646c612b8130ccd5192548ceea
change-id: 20261105-s4-opti-95922f7ce3a6

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

end of thread, other threads:[~2026-11-09  9:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 10:16 [PATCH 0/2] Optimise suspend handling for CCS igpu platforms Matthew Auld
2026-11-06 10:16 ` [PATCH 1/2] drm/xe: only evict CCS buffers from TT on iGPU Matthew Auld
2026-11-06 10:50   ` sashiko-bot
2026-11-06 11:34     ` Matthew Auld
2026-11-06 15:07   ` Thomas Hellström
2026-11-06 10:16 ` [PATCH 2/2] drm/xe/pm: skip BO eviction on iGPU for non-hibernation sleep Matthew Auld
2026-11-06 10:31   ` sashiko-bot
2026-11-06 10:32   ` Thomas Hellström
2026-11-06 11:02     ` Matthew Auld
2026-11-06 13:16       ` Matthew Auld
2026-11-06 15:11   ` Thomas Hellström
2026-11-06 17:07   ` Ville Syrjälä
2026-11-09  9:31     ` Matthew Auld
2026-11-06 11:06 ` ✓ CI.KUnit: success for Optimise suspend handling for CCS igpu platforms Patchwork
2026-11-06 11:40 ` ✓ Xe.CI.BAT: " Patchwork

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