]> git.ipfire.org Git - thirdparty/kernel/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)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 2 Mar 2026 16:12:28 +0000 (11:12 -0500)
commitcdc8a1e11f4d5b480ec750e28010c357185b95a6
tree55803c05e10e6cc3feed8bf84cf4b7221d6156d6
parent11439c4635edd669ae435eec308f4ab8a0804808
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
(cherry picked from commit 2bcbf2dcde0c839a73af664a3c77d4e77d58a3eb)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_ring_ops.c