Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/guc: Disable semaphores when using GuC scheduling

Semaphores are an optimization and not required for basic GuC submission
to work properly. Disable until we have time to do the implementation to
enable semaphores and tune them for performance. Also long direction is
just to delete semaphores from the i915 so another reason to not enable
these for GuC submission.

This patch fixes an existing bugs where I915_ENGINE_HAS_SEMAPHORES was
not honored correctly.

v2: Reword commit message
v3:
(John H)
- Add text to commit indicating this also fixing an existing bug
v4:
(John H)
- s/bug/bugs

Cc: John Harrison <john.c.harrison@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210721215101.139794-14-matthew.brost@intel.com

authored by

Matthew Brost and committed by
John Harrison
4dbd3944 38d5ec43

+4 -2
+4 -2
drivers/gpu/drm/i915/gem/i915_gem_context.c
··· 799 799 } 800 800 801 801 if (ctx->sched.priority >= I915_PRIORITY_NORMAL && 802 - intel_engine_has_timeslices(ce->engine)) 802 + intel_engine_has_timeslices(ce->engine) && 803 + intel_engine_has_semaphores(ce->engine)) 803 804 __set_bit(CONTEXT_USE_SEMAPHORES, &ce->flags); 804 805 805 806 if (IS_ACTIVE(CONFIG_DRM_I915_REQUEST_TIMEOUT) && ··· 1779 1778 if (!intel_engine_has_timeslices(ce->engine)) 1780 1779 return; 1781 1780 1782 - if (ctx->sched.priority >= I915_PRIORITY_NORMAL) 1781 + if (ctx->sched.priority >= I915_PRIORITY_NORMAL && 1782 + intel_engine_has_semaphores(ce->engine)) 1783 1783 intel_context_set_use_semaphores(ce); 1784 1784 else 1785 1785 intel_context_clear_use_semaphores(ce);