@@ -38,6 +38,8 @@
#include "drm_crtc_helper.h"
+#include <linux/debug_locks.h>
+
static unsigned int i915_modeset = -1;
module_param_named(modeset, i915_modeset, int, 0400);
@@ -153,6 +155,7 @@ void i965_reset(struct drm_device *dev, u8 flags)
udelay(100);
} while (mutex_is_locked(&dev->struct_mutex) && time_after(timeout, jiffies));
+ printk("i915: checking lock\n");
if (mutex_is_locked(&dev->struct_mutex)) {
#if 1
DRM_ERROR("i915 struct_mutex lock is still held by %s. Giving on up reset.\n", dev->struct_mutex.owner->task->comm);
@@ -169,13 +172,16 @@ void i965_reset(struct drm_device *dev, u8 flags)
#endif
debug_show_all_locks();
+ printk("i915: Acquiring mutex\n");
mutex_lock(&dev->struct_mutex);
/*
* Clear request list
*/
+ printk("i915: Retiring requests\n");
i915_gem_retire_requests(dev);
+ printk("i915: Saving display config\n");
if (need_display)
i915_save_display(dev);
@@ -191,6 +197,7 @@ void i965_reset(struct drm_device *dev, u8 flags)
udelay(50);
pci_write_config_byte(dev->pdev, GDRST, gdrst & 0xfeffffff);
+ printk("i915: Waiting for hardware to recover\n");
/* ...we don't want to loop forever though, 500ms should be plenty */
timeout = jiffies + msecs_to_jiffies(500);
do {
@@ -229,11 +236,13 @@ void i965_reset(struct drm_device *dev, u8 flags)
struct drm_i915_gem_object *obj_priv = obj->driver_private;
dev_priv->mm.suspended = 0;
+ printk("i915: Stop ring\n");
/* Stop the ring if it's running. */
I915_WRITE(PRB0_CTL, 0);
I915_WRITE(PRB0_TAIL, 0);
I915_WRITE(PRB0_HEAD, 0);
+ printk("i915: Init ring\n");
/* Initialize the ring. */
I915_WRITE(PRB0_START, obj_priv->gtt_offset);
I915_WRITE(PRB0_CTL,
@@ -251,7 +260,9 @@ void i965_reset(struct drm_device *dev, u8 flags)
}
mutex_unlock(&dev->struct_mutex);
+ printk("i915: irq_uninstall\n");
drm_irq_uninstall(dev);
+ printk("i915: irq_install\n");
drm_irq_install(dev);
mutex_lock(&dev->struct_mutex);
}
@@ -259,6 +270,7 @@ void i965_reset(struct drm_device *dev, u8 flags)
/*
* Display needs restore too...
*/
+ printk("i915: Restore display\n");
if (need_display)
i915_restore_display(dev);