]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Add initial support for separate kernel VRAM region on the tile
authorPiotr Piórkowski <piotr.piorkowski@intel.com>
Fri, 3 Oct 2025 16:26:15 +0000 (18:26 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 6 Oct 2025 06:33:46 +0000 (08:33 +0200)
commitdb7dde99049f04b99cbf518be3a189b3e9f5c1d8
tree5fe9a4f5f83a9ac1608d4a94ac9e068677ea408d
parentbdc2fb17ae9952bbce28d60ebab2520ed937363d
drm/xe: Add initial support for separate kernel VRAM region on the tile

So far, kernel and userspace allocations have shared the same VRAM region.
However, in some scenarios, it may be necessary to reserve a separate
VRAM area exclusively for kernel allocations.
Let's add preliminary support for such a configuration.

v2:
- replaced for_each_bo_flag_vram with the improved
  for_each_set_bo_vram_flag helper (Matthew)
- moved the VRAM flag iteration macro definition into xe_bo.c (Matthew)
- drop unused bo_flgas from bo_vram_flags_to_vram_placement (Matthew)
- use hweight32 helper in __xe_bo_fixed_placement for readability
  (Matthew)
v3: remove unnecessary VRAM fixup id

Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://lore.kernel.org/r/20251003162619.1984236-2-piotr.piorkowski@intel.com
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_tile.c
drivers/gpu/drm/xe/xe_vram.c