diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 81f086397d10b8499ae4b7fab29fb585b6f25ab1..94e4db1870aa35f83b9eeddba1e5f467ea300c03 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -610,7 +610,7 @@ static bool engine_has_kernel_context_barrier(struct intel_engine_cs *engine)
 
 		any_active = true;
 
-		if (rq->gem_context == i915->kernel_context)
+		if (rq->hw_context == ce)
 			continue;
 
 		/*