drm/i915/perf: Add preemption check while waiting for OA
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 14 Nov 2019 14:02:24 +0000 (16:02 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Nov 2019 16:43:33 +0000 (16:43 +0000)
While we're waiting for the OA configuration to apply, let's give a
chance to other contexts that might need to run other workloads.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191114140224.21818-1-lionel.g.landwerlin@intel.com
drivers/gpu/drm/i915/i915_perf.c

index 31e47ee23357cd3b3b30afecb0183354eb1be9ab..608e6c3f3c1a265658d1d16720f6ad3878ded55a 100644 (file)
@@ -1777,6 +1777,8 @@ static int alloc_noa_wait(struct i915_perf_stream *stream)
        *cs++ = MI_MATH_ADD;
        *cs++ = MI_MATH_STOREINV(MI_MATH_REG(JUMP_PREDICATE), MI_MATH_REG_CF);
 
+       *cs++ = MI_ARB_CHECK;
+
        /*
         * Transfer the result into the predicate register to be used for the
         * predicated jump.