drm/i915: Only reset the pinned kernel contexts on resume
On resume, we know that the only pinned contexts in danger of seeing corruption are the kernel context, and so we do not need to walk the list of all GEM contexts as we tracked them on each engine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190410190120.830-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -4513,7 +4513,7 @@ void i915_gem_resume(struct drm_i915_private *i915)
|
||||
* guarantee that the context image is complete. So let's just reset
|
||||
* it and start again.
|
||||
*/
|
||||
i915->gt.resume(i915);
|
||||
intel_gt_resume(i915);
|
||||
|
||||
if (i915_gem_init_hw(i915))
|
||||
goto err_wedged;
|
||||
@@ -4853,13 +4853,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
|
||||
|
||||
dev_priv->mm.unordered_timeline = dma_fence_context_alloc(1);
|
||||
|
||||
if (HAS_LOGICAL_RING_CONTEXTS(dev_priv)) {
|
||||
dev_priv->gt.resume = intel_lr_context_resume;
|
||||
if (HAS_LOGICAL_RING_CONTEXTS(dev_priv))
|
||||
dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup;
|
||||
} else {
|
||||
dev_priv->gt.resume = intel_legacy_submission_resume;
|
||||
else
|
||||
dev_priv->gt.cleanup_engine = intel_engine_cleanup;
|
||||
}
|
||||
|
||||
i915_timelines_init(dev_priv);
|
||||
|
||||
|
Reference in New Issue
Block a user