mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
drm/i915: Keep the rings stopped until they have been re-initialized
Before modifying the ring register (RING_START, HEAD, TAIL, CTL) we first make sure it is stopped (or else the hw may not resample the registers). However, we do not need to let the hw restart until after we have reprogrammed all the rings. This should help prevent situations where pending operations on the ring may resume (because we are trying to re-initialize following an unsuccessful GPU hang, i.e. from i915_gem_unset_wedged). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103260 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171013131218.18013-1-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
This commit is contained in:
parent
5d031f4e16
commit
7836cd02f2
@ -484,11 +484,6 @@ static bool stop_ring(struct intel_engine_cs *engine)
|
|||||||
I915_WRITE_HEAD(engine, 0);
|
I915_WRITE_HEAD(engine, 0);
|
||||||
I915_WRITE_TAIL(engine, 0);
|
I915_WRITE_TAIL(engine, 0);
|
||||||
|
|
||||||
if (INTEL_GEN(dev_priv) > 2) {
|
|
||||||
(void)I915_READ_CTL(engine);
|
|
||||||
I915_WRITE_MODE(engine, _MASKED_BIT_DISABLE(STOP_RING));
|
|
||||||
}
|
|
||||||
|
|
||||||
return (I915_READ_HEAD(engine) & HEAD_ADDR) == 0;
|
return (I915_READ_HEAD(engine) & HEAD_ADDR) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,6 +565,9 @@ static int init_ring_common(struct intel_engine_cs *engine)
|
|||||||
|
|
||||||
intel_engine_init_hangcheck(engine);
|
intel_engine_init_hangcheck(engine);
|
||||||
|
|
||||||
|
if (INTEL_GEN(dev_priv) > 2)
|
||||||
|
I915_WRITE_MODE(engine, _MASKED_BIT_DISABLE(STOP_RING));
|
||||||
|
|
||||||
out:
|
out:
|
||||||
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
|
intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user