[PATCH v10 0/5] Cleaning up code related to VRAM regions and its initialization - part 2
Matthew Brost
matthew.brost at intel.com
Fri Jul 11 15:22:28 UTC 2025
On Wed, Jul 09, 2025 at 02:15:38PM +0200, Piórkowski, Piotr wrote:
> From: Piotr Piórkowski <piotr.piorkowski at intel.com>
>
> As a follow-up to the earlier VRAM region cleanups, this patch series
> focuses on further improving the flexibility and clarity of
> the Xe driver's VRAM management.
>
> This series focuses on preparing the VRAM region handling code for future
> platforms, where a more dynamic representation of device and tile VRAM
> regions will be required. Static allocation of these structures is replaced
> with dynamic allocation to increase flexibility and improve maintainability.
> Additionally, the initialization logic for device-wide and tile-local VRAM
> regions is unified, replacing the previously separate code paths. This
> simplification improves code clarity and facilitates future extensions
> involving additional VRAM region types.
>
> v2:
> - fix doc comments in struct xe_vram_region
> - remove unnecessary includes (Jani)
> v3:
> - move code from xe_vram_init_regions_managers to xe_tile_init_noalloc
> (Matthew)
> - replace ioremap_wc to devm_ioremap_wc for mapping VRAM BAR
> (Matthew)
> - Replace the tile id parameter with vram region in the xe_pf_begin
> function.
> v4:
> - add new patch "Use devm_ioremap_wc for VRAM mapping and drop manual
> unmap" (Matthew)
> - add new patch "Move struct xe_vram_region to a dedicated header" (Jani)
> - fix null pointer dereference in xe_assert when VRAM region for tile
> hasn't been initialized (Michal)
> v5:
> - Fix build if CONFIG_DRM_XE_DEVMEM_MIRROR is enabled
> v6:
> - Fix build if CONFIG_DRM_XE_DISPLAY is enabled
> v7:
> - rebase after new changes related to SVM
> v8:
> - rebase
> - add a helpers for accessing fields of the xe_vram_region structure in
> patch "drm/xe: Use dynamic allocation for tile and device VRAM region
> structures"
> v9:
> - rebase
> v10:
> - remove tile back pointer from struct xe_vram_region (with
> modifications in xe_svm.c) (Matthew Brost)
> - add new back pointers: xe and migarte to xe_vram_region (with
> modifications in xe_svm.c) (Matthew Brost)
> - add patch "drm/xe: Split xe_migrate allocation from initialization"
> - move helper to get tile dpagemap to xe_svm.c (Matthew Brost)
>
> Cc: Matthew Auld <matthew.auld at intel.com>
> Cc: Stuart Summers <stuart.summers at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Jani Nikula <jani.nikula at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
> Cc: Matthew Brost <matthew.brost at intel.com>
For the series:
Acked-by: Matthew Brost <matthew.brost at intel.com>
>
> Piotr Piórkowski (5):
> drm/xe: Use devm_ioremap_wc for VRAM mapping and drop manual unmap
> drm/xe: Use dynamic allocation for tile and device VRAM region
> structures
> drm/xe: Move struct xe_vram_region to a dedicated header
> drm/xe: Split xe_migrate allocation from initialization
> drm/xe: Unify the initialization of VRAM regions
>
> drivers/gpu/drm/xe/display/xe_fb_pin.c | 5 +-
> drivers/gpu/drm/xe/display/xe_plane_initial.c | 3 +-
> drivers/gpu/drm/xe/xe_assert.h | 4 +-
> drivers/gpu/drm/xe/xe_bo.c | 1 +
> drivers/gpu/drm/xe/xe_bo.h | 4 +-
> drivers/gpu/drm/xe/xe_bo_types.h | 1 +
> drivers/gpu/drm/xe/xe_device.c | 20 ++
> drivers/gpu/drm/xe/xe_device_types.h | 62 +-----
> drivers/gpu/drm/xe/xe_gt_pagefault.c | 13 +-
> drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c | 3 +-
> drivers/gpu/drm/xe/xe_migrate.c | 50 +++--
> drivers/gpu/drm/xe/xe_migrate.h | 1 +
> drivers/gpu/drm/xe/xe_pci.c | 6 +
> drivers/gpu/drm/xe/xe_query.c | 5 +-
> drivers/gpu/drm/xe/xe_svm.c | 63 +++---
> drivers/gpu/drm/xe/xe_tile.c | 62 ++++--
> drivers/gpu/drm/xe/xe_tile.h | 13 +-
> drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 10 +-
> drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 22 +-
> drivers/gpu/drm/xe/xe_ttm_vram_mgr.h | 3 +-
> drivers/gpu/drm/xe/xe_vram.c | 209 +++++++++++++-----
> drivers/gpu/drm/xe/xe_vram.h | 11 +
> drivers/gpu/drm/xe/xe_vram_types.h | 85 +++++++
> 23 files changed, 427 insertions(+), 229 deletions(-)
> create mode 100644 drivers/gpu/drm/xe/xe_vram_types.h
>
> --
> 2.34.1
>
More information about the Intel-xe
mailing list