[PATCH v1 0/4] Introduce PF-mem VRAM regions
Piórkowski, Piotr <[email protected]>
| Newsgroups | org.freedesktop.lists.intel-xe |
|---|---|
| Message-ID | <[email protected]> |
From: Piotr Piórkowski <[email protected]> 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. 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 | 115 +++++++++++++++++++++++++++ drivers/gpu/drm/xe/xe_bo.c | 16 +++- drivers/gpu/drm/xe/xe_bo.h | 17 ++++ drivers/gpu/drm/xe/xe_bo_evict.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 | 6 +- drivers/gpu/drm/xe/xe_vram.c | 85 ++++++++++++++++++-- drivers/gpu/drm/xe/xe_vram.h | 11 ++- drivers/gpu/drm/xe/xe_vram_types.h | 14 +++- 11 files changed, 266 insertions(+), 23 deletions(-) create mode 100644 drivers/gpu/drm/xe/tests/xe_vram.c -- 2.34.1