]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/guc: Enable the Dynamic Inhibit Context Switch optimization
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 25 Jun 2025 20:54:07 +0000 (13:54 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 27 Jun 2025 18:08:50 +0000 (11:08 -0700)
commit9c7d93a8f1ec0415457037a5748b0ee60e50a095
tree1edffb663de40081d97e01fdb51eba84b05b8be3
parenta7ffcea8631af91479cab10aa7fbfd0722f01d9a
drm/xe/guc: Enable the Dynamic Inhibit Context Switch optimization

The Dynamic Inhibit Context Switch is an optimization aimed at reducing
the amount of time the HW is stuck waiting on an unsatisfied semaphore.
When this optimization is enabled, the GuC will dynamically modify the
CTX_CTRL_INHIBIT_SYN_CTX_SWITCH in the CTX_CONTEXT_CONTROL register of
LRCs to enable immediate switching out on an unsatisfied semaphore wait
when multiple contexts are competing for time on the same engine.

This feature is available on recent HW from GuC 70.40.1 onwards and it
is enabled via a per-VF feature opt-in.

v2: rebase
v3: switch to using guc_buf_cache instead of dedicated alloc
v4: add helper to check for feature availability (Michal), don't enable
if multi-lrc is possible.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Julia Filipchuk <julia.filipchuk@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://lore.kernel.org/r/20250625205405.1653212-4-daniele.ceraolospurio@intel.com
drivers/gpu/drm/xe/abi/guc_klvs_abi.h
drivers/gpu/drm/xe/xe_guc.c