Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Introduce PF-mem VRAM regions
@ 2026-08-24  8:09 Piórkowski, Piotr
  2026-08-24  8:09 ` [PATCH v3 1/4] drm/xe/vram: Add binding information to " Piórkowski, Piotr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Piórkowski, Piotr @ 2026-08-24  8:09 UTC (permalink / raw)
  To: intel-xe; +Cc: Piotr Piórkowski

From: Piotr Piórkowski <piotr.piorkowski@intel.com>

This series lays the groundwork for PF-mem regions: VRAM regions
dedicated to kernel-only allocations, where buffers are allocated
exclusively by the kernel driver and are never exposed to userspace
workloads.

Today a tile exposes a single VRAM region shared by both kernel and
userspace allocations. Some use cases need a separate VRAM region
carved out of a tile and reserved for the kernel driver only. For
example, on an SR-IOV PF most of the tile VRAM is provisioned to VFs;
the kernel driver still needs its own allocations, which must come from
a region reserved for the kernel and kept apart from the VRAM handed
out to VFs. That reserved kernel region is what PF-mem provides.

To support this, the VRAM region abstraction needs a way to distinguish
regions by purpose, dedicated TTM placements so the BO paths can route
and evict such buffers correctly, and helpers to create a region from a
caller-provided parent, offset, and size.

v1 -> v2:
 - Add comments explaining why PF-mem is excluded from user BO eviction
   (Sashiko).
 - Resolve xe_ttm_vram_mgr_alloc_sgt() physical address via
   xe_map_resource_to_region() instead of the tile's
   VRAM region (Sashiko).
 - Enforce page alignment on offset/size and guard against a NULL
   parent BAR mapping (Sashiko)
v2 -> v3:
 - Add XE_VRAM_BINDING_NONE as the zero value, use
   XE_VRAM_BINDING_DEVICE for the aggregate device VRAM region, and
   validate binding, ID, and placement during region allocation and
   initialization (Sashiko)
 - Enforce page alignment for PF-mem offsets and sizes, and reject
   regions with a NULL parent BAR mapping (Sashiko)
 - Use a mock BAR mapping that fits into a pointer on 32-bit builds.
   (Sashiko).
 - Exercise page-aligned out-of-bounds ranges separately from unaligned
   offset and size validation in the PF-mem KUnit tests (Sashiko).

Piotr Piórkowski (4):
  drm/xe/vram: Add binding information to VRAM regions
  drm/xe/ttm: Add PF-mem VRAM placement types for TTM
  drm/xe/vram: Add initial support for PF-mem regions
  drm/xe/kunit: Add tests for PF-mem regions

 drivers/gpu/drm/xe/tests/xe_vram.c   | 118 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_bo.c           |  25 ++++--
 drivers/gpu/drm/xe/xe_bo.h           |  17 ++++
 drivers/gpu/drm/xe/xe_bo_evict.c     |   7 +-
 drivers/gpu/drm/xe/xe_device.c       |   2 +-
 drivers/gpu/drm/xe/xe_pm.c           |   4 +-
 drivers/gpu/drm/xe/xe_res_cursor.h   |   9 +-
 drivers/gpu/drm/xe/xe_tile.c         |  10 ++-
 drivers/gpu/drm/xe/xe_ttm_vram_mgr.c |   9 +-
 drivers/gpu/drm/xe/xe_vram.c         | 118 +++++++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_vram.h         |  11 ++-
 drivers/gpu/drm/xe/xe_vram_types.h   |  18 +++-
 12 files changed, 316 insertions(+), 32 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/tests/xe_vram.c

-- 
2.34.1


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

end of thread, other threads:[~2026-08-25 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24  8:09 [PATCH v3 0/4] Introduce PF-mem VRAM regions Piórkowski, Piotr
2026-08-24  8:09 ` [PATCH v3 1/4] drm/xe/vram: Add binding information to " Piórkowski, Piotr
2026-08-24  8:09 ` [PATCH v3 2/4] drm/xe/ttm: Add PF-mem VRAM placement types for TTM Piórkowski, Piotr
2026-08-24  8:09 ` [PATCH v3 3/4] drm/xe/vram: Add initial support for PF-mem regions Piórkowski, Piotr
2026-08-24  8:09 ` [PATCH v3 4/4] drm/xe/kunit: Add tests " Piórkowski, Piotr
2026-08-25  5:39 ` ✗ CI.checkpatch: warning for Introduce PF-mem VRAM regions (rev3) Patchwork
2026-08-25  5:40 ` ✓ CI.KUnit: success " Patchwork
2026-08-25  6:19 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-25 10:19 ` ✗ Xe.CI.FULL: failure " Patchwork

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