drm/i915: Make closing request flush mandatory
For symmetry, simplicity and ensuring the request is always truly idle upon its completion, always emit the closing flush prior to emitting the request breadcrumb. Previously, we would only emit the flush if we had started a user batch, but this just leaves all the other paths open to speculation (do they affect the GPU caches or not?) With mm switching, a key requirement is that the GPU is flushed and invalidated before hand, so for absolute safety, we want that closing flush be mandatory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180612105135.4459-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -3213,7 +3213,7 @@ void i915_gem_reset(struct drm_i915_private *dev_priv,
|
||||
rq = i915_request_alloc(engine,
|
||||
dev_priv->kernel_context);
|
||||
if (!IS_ERR(rq))
|
||||
__i915_request_add(rq, false);
|
||||
i915_request_add(rq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5332,7 +5332,7 @@ static int __intel_engines_record_defaults(struct drm_i915_private *i915)
|
||||
if (engine->init_context)
|
||||
err = engine->init_context(rq);
|
||||
|
||||
__i915_request_add(rq, true);
|
||||
i915_request_add(rq);
|
||||
if (err)
|
||||
goto err_active;
|
||||
}
|
||||
|
Reference in New Issue
Block a user