drm/i915: Only print 'generating error event' if we actually are
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 1 Oct 2010 12:23:27 +0000 (13:23 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 1 Oct 2010 13:48:20 +0000 (14:48 +0100)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_irq.c

index aaa0f1b9d6e1f8fec6be2ddf2a71faa6a47a3f2f..64c07c24e3001af891f8ed659a2ecfc4aad7026b 100644 (file)
@@ -396,7 +396,6 @@ static void i915_error_work_func(struct work_struct *work)
        char *reset_event[] = { "RESET=1", NULL };
        char *reset_done_event[] = { "ERROR=0", NULL };
 
-       DRM_DEBUG_DRIVER("generating error event\n");
        kobject_uevent_env(&dev->primary->kdev.kobj, KOBJ_CHANGE, error_event);
 
        if (atomic_read(&dev_priv->mm.wedged)) {
@@ -574,8 +573,10 @@ static void i915_capture_error_state(struct drm_device *dev)
                return;
        }
 
+       DRM_DEBUG_DRIVER("generating error event\n");
+
        error->seqno =
-               dev_priv->render_ring.get_seqno(dev, &dev_priv->render_ring);
+               dev_priv->render_ring.get_seqno(dev, &dev_priv->render_ring);
        error->eir = I915_READ(EIR);
        error->pgtbl_er = I915_READ(PGTBL_ER);
        error->pipeastat = I915_READ(PIPEASTAT);