drm/i915: Disable preempt busywait when using GuC scheduling
authorMatthew Brost <matthew.brost@intel.com>
Wed, 21 Jul 2021 21:50:54 +0000 (14:50 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 22 Jul 2021 17:07:18 +0000 (10:07 -0700)
Disable preempt busywait when using GuC scheduling. This isn't needed as
the GuC controls preemption when scheduling.

v2:
 (John H):
  - Fix commit message

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-12-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/gen8_engine_cs.c

index a69f5c4..b29eb9f 100644 (file)
@@ -506,7 +506,8 @@ gen8_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
        *cs++ = MI_USER_INTERRUPT;
 
        *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
-       if (intel_engine_has_semaphores(rq->engine))
+       if (intel_engine_has_semaphores(rq->engine) &&
+           !intel_uc_uses_guc_submission(&rq->engine->gt->uc))
                cs = emit_preempt_busywait(rq, cs);
 
        rq->tail = intel_ring_offset(rq, cs);
@@ -598,7 +599,8 @@ gen12_emit_fini_breadcrumb_tail(struct i915_request *rq, u32 *cs)
        *cs++ = MI_USER_INTERRUPT;
 
        *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
-       if (intel_engine_has_semaphores(rq->engine))
+       if (intel_engine_has_semaphores(rq->engine) &&
+           !intel_uc_uses_guc_submission(&rq->engine->gt->uc))
                cs = gen12_emit_preempt_busywait(rq, cs);
 
        rq->tail = intel_ring_offset(rq, cs);