diff options
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 6fb20fed36a..cb8d7069df4 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -711,20 +711,22 @@ inteldrm_intr(void *arg) struct drm_device *dev = (struct drm_device *)dev_priv->drmdev; u_int32_t iir, pipea_stats = 0, pipeb_stats = 0; - /* we're not set up, don't poke the hw */ - if (dev_priv->hw_status_page == NULL) - return (0); /* - * lock is to protect from writes to PIPESTAT and IMR from other cores. + * we're not set up, don't poke the hw and if we're vt switched + * then nothing will be enabled */ - mtx_enter(&dev_priv->user_irq_lock); + if (dev_priv->hw_status_page == NULL || dev_priv->mm.suspended) + return (0); + iir = I915_READ(IIR); - if (iir == 0) { - mtx_leave(&dev_priv->user_irq_lock); + if (iir == 0) return (0); - } /* + * lock is to protect from writes to PIPESTAT and IMR from other cores. + */ + mtx_enter(&dev_priv->user_irq_lock); + /* * Clear the PIPE(A|B)STAT regs before the IIR */ if (iir & I915_DISPLAY_PIPE_A_EVENT_INTERRUPT) { |