]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Combine userspace context check
authorPiotr Piórkowski <piotr.piorkowski@intel.com>
Fri, 3 Oct 2025 16:26:19 +0000 (18:26 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 6 Oct 2025 06:33:52 +0000 (08:33 +0200)
commit8462d16d1b75325cb7220cd2731a47033baff863
tree9dc0cedc6b0eb1b77de811aabe576e0e0164d2bf
parentb48140f4465090b5b21110a9df9a9aa546c69152
drm/xe: Combine userspace context check

Both vm->xef and XE_LRC_CREATE_USER_CTX indicate in xe_lrc_init that
the context originates from userspace. However, XE_LRC_CREATE_USER_CTX
has a broader scope as it may be set even when no vm->xef is present.
The XE_BO_FLAG_PINNED_LATE_RESTORE flag can be extended to both cases,
so there is no point in handling the two cases separately.
Let's combine vm->xef and XE_LRC_CREATE_USER_CTX checks to detect
userspace context.

Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Suggested-by: 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-6-piotr.piorkowski@intel.com
drivers/gpu/drm/xe/xe_lrc.c