]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe: Do not preempt fence signaling CS instructions
authorMatthew Brost <matthew.brost@intel.com>
Thu, 15 Jan 2026 00:45:46 +0000 (16:45 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 26 Feb 2026 18:04:38 +0000 (10:04 -0800)
commit2bcbf2dcde0c839a73af664a3c77d4e77d58a3eb
tree710a30a08a49caaea6c32c5182958302c8580292
parentc2190f11dc3bf24b177e364c23e232b859c8716f
drm/xe: Do not preempt fence signaling CS instructions

If a batch buffer is complete, it makes little sense to preempt the
fence signaling instructions in the ring, as the largest portion of the
work (the batch buffer) is already done and fence signaling consists of
only a few instructions. If these instructions are preempted, the GuC
would need to perform a context switch just to signal the fence, which
is costly and delays fence signaling. Avoid this scenario by disabling
preemption immediately after the BB start instruction and re-enabling it
after executing the fence signaling instructions.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Carlos Santa <carlos.santa@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patch.msgid.link/20260115004546.58060-1-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_ring_ops.c