| @@ -1487,28 +1487,33 @@ void i915_handle_error(struct drm_device | | | @@ -1487,28 +1487,33 @@ void i915_handle_error(struct drm_device |
1487 | | | 1487 | |
1488 | i915_capture_error_state(dev); | | 1488 | i915_capture_error_state(dev); |
1489 | i915_report_and_clear_eir(dev); | | 1489 | i915_report_and_clear_eir(dev); |
1490 | | | 1490 | |
1491 | if (wedged) { | | 1491 | if (wedged) { |
1492 | INIT_COMPLETION(dev_priv->error_completion); | | 1492 | INIT_COMPLETION(dev_priv->error_completion); |
1493 | atomic_set(&dev_priv->mm.wedged, 1); | | 1493 | atomic_set(&dev_priv->mm.wedged, 1); |
1494 | | | 1494 | |
1495 | /* | | 1495 | /* |
1496 | * Wakeup waiting processes so they don't hang | | 1496 | * Wakeup waiting processes so they don't hang |
1497 | */ | | 1497 | */ |
1498 | for_each_ring(ring, dev_priv, i) | | 1498 | for_each_ring(ring, dev_priv, i) |
1499 | #ifdef __NetBSD__ | | 1499 | #ifdef __NetBSD__ |
| | | 1500 | { |
| | | 1501 | unsigned long flags; |
| | | 1502 | spin_lock_irqsave(&dev_priv->irq_lock, flags); |
1500 | DRM_SPIN_WAKEUP_ALL(&ring->irq_queue, | | 1503 | DRM_SPIN_WAKEUP_ALL(&ring->irq_queue, |
1501 | &dev_priv->irq_lock); | | 1504 | &dev_priv->irq_lock); |
| | | 1505 | spin_unlock_irqrestore(&dev_priv->irq_lock, flags); |
| | | 1506 | } |
1502 | #else | | 1507 | #else |
1503 | wake_up_all(&ring->irq_queue); | | 1508 | wake_up_all(&ring->irq_queue); |
1504 | #endif | | 1509 | #endif |
1505 | } | | 1510 | } |
1506 | | | 1511 | |
1507 | queue_work(dev_priv->wq, &dev_priv->error_work); | | 1512 | queue_work(dev_priv->wq, &dev_priv->error_work); |
1508 | } | | 1513 | } |
1509 | | | 1514 | |
1510 | static void i915_pageflip_stall_check(struct drm_device *dev, int pipe) | | 1515 | static void i915_pageflip_stall_check(struct drm_device *dev, int pipe) |
1511 | { | | 1516 | { |
1512 | drm_i915_private_t *dev_priv = dev->dev_private; | | 1517 | drm_i915_private_t *dev_priv = dev->dev_private; |
1513 | struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; | | 1518 | struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; |
1514 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | | 1519 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |