mirror of https://gitee.com/openkylin/linux.git
drm/i915: Move init_unused_rings to gem_init_hw
We need to do that every time we resume the rings, not just at load. I've overlooked this in my untangling of the ring init code. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
e7778be1ea
commit
d5abdfda91
|
@ -4709,14 +4709,6 @@ int i915_gem_init_rings(struct drm_device *dev)
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
|
||||||
* At least 830 can leave some of the unused rings
|
|
||||||
* "active" (ie. head != tail) after resume which
|
|
||||||
* will prevent c3 entry. Makes sure all unused rings
|
|
||||||
* are totally idle.
|
|
||||||
*/
|
|
||||||
init_unused_rings(dev);
|
|
||||||
|
|
||||||
ret = intel_init_render_ring_buffer(dev);
|
ret = intel_init_render_ring_buffer(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -4796,6 +4788,14 @@ i915_gem_init_hw(struct drm_device *dev)
|
||||||
|
|
||||||
i915_gem_init_swizzling(dev);
|
i915_gem_init_swizzling(dev);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* At least 830 can leave some of the unused rings
|
||||||
|
* "active" (ie. head != tail) after resume which
|
||||||
|
* will prevent c3 entry. Makes sure all unused rings
|
||||||
|
* are totally idle.
|
||||||
|
*/
|
||||||
|
init_unused_rings(dev);
|
||||||
|
|
||||||
for_each_ring(ring, dev_priv, i) {
|
for_each_ring(ring, dev_priv, i) {
|
||||||
ret = ring->init_hw(ring);
|
ret = ring->init_hw(ring);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in New Issue