[Intel-gfx] [PATCH 5/5] Add debugging output to reset logic
Ben Gamari
bgamari.foss at gmail.com
Wed Jul 15 08:56:01 CEST 2009
---
drivers/gpu/drm/i915/i915_drv.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7a64b9e..fc3fa0c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -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);
@@ -148,6 +150,7 @@ void i965_reset(struct drm_device *dev, u8 flags)
bool need_display = true; //!(flags & (GDRST_RENDER | GDRST_MEDIA));
#if defined(CONFIG_SMP)
+ printk("i915: checking lock\n");
if (mutex_is_locked(&dev->struct_mutex)) {
struct task_struct *task = dev->struct_mutex.owner->task;
DRM_ERROR("Killing process %d (%s) for holding i915 device mutex\n",
@@ -159,18 +162,22 @@ void i965_reset(struct drm_device *dev, u8 flags)
#endif
debug_show_all_locks();
+ printk("i915: Acquiring mutex\n");
mutex_lock(&dev->struct_mutex);
/*
* Wakeup waiting processes so they don't hang
*/
+ printk("i915: Waking up sleeping processes\n");
DRM_WAKEUP(&dev_priv->irq_queue);
/*
* 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);
@@ -184,6 +191,7 @@ void i965_reset(struct drm_device *dev, u8 flags)
udelay(50);
pci_write_config_byte(dev->pdev, GDRST, gdrst & 0x1);
+ printk("i915: Waiting for hardware to recover\n");
/* ...we don't want to loop forever though, 500ms should be plenty */
do {
udelay(100);
@@ -215,11 +223,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,
@@ -237,7 +247,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);
}
@@ -245,6 +257,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);
--
1.6.3.3
More information about the Intel-gfx
mailing list