summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_lrc.c
diff options
context:
space:
mode:
authorPiotr Piórkowski <piotr.piorkowski@intel.com>2025-10-03 18:26:17 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2025-10-06 08:33:49 +0200
commit3f6cd669d50b67c2a33642c811a3a6645f0334e8 (patch)
treed56bb4f392c4d437ae0d11040369317d85f18b9e /drivers/gpu/drm/xe/xe_lrc.c
parent9d290ab0b5a054cf5bb39a80b90140fa22704f61 (diff)
drm/xe: Force user context allocations in user VRAM
In general, kernel structures should be allocated in the kernel-dedicated VRAM region. However, userspace context data - while used by the kernel - does not need to reside there. Let's force the allocation of such data in the general-purpose VRAM region accessible to userspace. 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-4-piotr.piorkowski@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_lrc.c')
-rw-r--r--drivers/gpu/drm/xe/xe_lrc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 47e9df775072..c88e90175f59 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -1415,6 +1415,9 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
if (vm && vm->xef) /* userspace */
bo_flags |= XE_BO_FLAG_PINNED_LATE_RESTORE;
+ if (init_flags & XE_LRC_CREATE_USER_CTX)
+ bo_flags |= XE_BO_FLAG_FORCE_USER_VRAM;
+
lrc->bo = xe_bo_create_pin_map_novm(xe, tile,
bo_size,
ttm_bo_type_kernel,