drm/i915: Remove the global irq wait queue
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 11 Nov 2010 01:16:58 +0000 (01:16 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 11 Nov 2010 01:16:58 +0000 (01:16 +0000)
... as it has been replaced by per-ring waiters.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c

index 9cb6061..4c8fae9 100644 (file)
@@ -1022,7 +1022,6 @@ i915_wedged_write(struct file *filp,
                  loff_t *ppos)
 {
        struct drm_device *dev = filp->private_data;
-       drm_i915_private_t *dev_priv = dev->dev_private;
        char buf[20];
        int val = 1;
 
@@ -1038,12 +1037,7 @@ i915_wedged_write(struct file *filp,
        }
 
        DRM_INFO("Manually setting wedged to %d\n", val);
-
-       atomic_set(&dev_priv->mm.wedged, val);
-       if (val) {
-               wake_up_all(&dev_priv->irq_queue);
-               queue_work(dev_priv->wq, &dev_priv->error_work);
-       }
+       i915_handle_error(dev, val);
 
        return cnt;
 }
index ff7593f..30d7a7b 100644 (file)
@@ -289,7 +289,6 @@ typedef struct drm_i915_private {
        int current_page;
        int page_flipping;
 
-       wait_queue_head_t irq_queue;
        atomic_t irq_received;
        /** Protects user_irq_refcount and irq_mask_reg */
        spinlock_t user_irq_lock;
@@ -915,6 +914,7 @@ extern void i915_update_gfx_val(struct drm_i915_private *dev_priv);
 
 /* i915_irq.c */
 void i915_hangcheck_elapsed(unsigned long data);
+void i915_handle_error(struct drm_device *dev, bool wedged);
 extern int i915_irq_emit(struct drm_device *dev, void *data,
                         struct drm_file *file_priv);
 extern int i915_irq_wait(struct drm_device *dev, void *data,
index 3ec631f..4a0664e 100644 (file)
@@ -891,7 +891,7 @@ static void i915_report_and_clear_eir(struct drm_device *dev)
  * so userspace knows something bad happened (should trigger collection
  * of a ring dump etc.).
  */
-static void i915_handle_error(struct drm_device *dev, bool wedged)
+void i915_handle_error(struct drm_device *dev, bool wedged)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;