summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_drv.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-19 12:38:26 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 11:19:54 +0100
commitf803aa5532d14efc463abbeae10faa115c457a07 (patch)
tree67d70179b08c2619edf336d374e3f0dda440f25c /drivers/gpu/drm/i915/i915_drv.c
parent77f01230223a08792f5320ebba27af9cbb81b0cf (diff)
drm/i915: Clean up bo lists on all hung gpus
Previously we only tidied up the active bo lists for chipsets were we would attempt to reset the GPU. However, this action is necessary for the system to continue and reclaim the dead bo for all chipsets. Pointed out, in passing, by Owain Ainsworth. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 38e889bfd99c..2ddac06d5967 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -368,7 +368,7 @@ static int ironlake_do_reset(struct drm_device *dev, u8 flags)
* - re-init interrupt state
* - re-init display
*/
-int i965_reset(struct drm_device *dev, u8 flags)
+int i915_reset(struct drm_device *dev, u8 flags)
{
drm_i915_private_t *dev_priv = dev->dev_private;
/*
@@ -401,14 +401,19 @@ int i965_reset(struct drm_device *dev, u8 flags)
* well as the reset bit (GR/bit 0). Setting the GR bit
* triggers the reset; when done, the hardware will clear it.
*/
- if (IS_IRONLAKE(dev))
+ ret = -ENODEV;
+ switch (INTEL_INFO(dev)->gen) {
+ case 5:
ret = ironlake_do_reset(dev, flags);
- else
+ break;
+ case 4:
ret = i965_do_reset(dev, flags);
+ break;
+ }
if (ret) {
- WARN(true, "i915: Failed to reset chip\n");
+ DRM_ERROR("Failed to reset chip.\n");
mutex_unlock(&dev->struct_mutex);
- return -EIO;
+ return ret;
}
/* Ok, now get things going again... */