aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-19 07:21:28 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 06:19:52 -0400
commit9375e446e7f43be9a7c21e246cee35ea912532ec (patch)
treeb30d34f156ed36c830cedc431b3ef4c6a85d2011 /drivers/gpu/drm/i915/i915_gem.c
parent9220434a8768902cd9cf248709972678b74aa8c1 (diff)
drm/i915: Clear flushing lists on GPU reset
Owain Ainsworth noticed that the reset code failed to clear the flushing list leaving the driver in an inconsistent state following a hung GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cf2765529cfe..4e978e4044a3 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1683,6 +1683,22 @@ i915_get_gem_seqno(struct drm_device *dev,
1683 return ring->get_gem_seqno(dev, ring); 1683 return ring->get_gem_seqno(dev, ring);
1684} 1684}
1685 1685
1686void i915_gem_reset_flushing_list(struct drm_device *dev)
1687{
1688 struct drm_i915_private *dev_priv = dev->dev_private;
1689
1690 while (!list_empty(&dev_priv->mm.flushing_list)) {
1691 struct drm_i915_gem_object *obj_priv;
1692
1693 obj_priv = list_first_entry(&dev_priv->mm.flushing_list,
1694 struct drm_i915_gem_object,
1695 list);
1696
1697 obj_priv->base.write_domain = 0;
1698 i915_gem_object_move_to_inactive(&obj_priv->base);
1699 }
1700}
1701
1686/** 1702/**
1687 * This function clears the request list as sequence numbers are passed. 1703 * This function clears the request list as sequence numbers are passed.
1688 */ 1704 */