diff options
Diffstat (limited to 'sys/dev/pci/drm/r128_irq.c')
-rw-r--r-- | sys/dev/pci/drm/r128_irq.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/r128_irq.c b/sys/dev/pci/drm/r128_irq.c index 50f1f08920d..48ef8987f77 100644 --- a/sys/dev/pci/drm/r128_irq.c +++ b/sys/dev/pci/drm/r128_irq.c @@ -90,7 +90,8 @@ void r128_disable_vblank(struct drm_device *dev, int crtc) */ } -void r128_driver_irq_preinstall(struct drm_device * dev) +int +r128_driver_irq_install(struct drm_device * dev) { drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; @@ -98,14 +99,21 @@ void r128_driver_irq_preinstall(struct drm_device * dev) R128_WRITE(R128_GEN_INT_CNTL, 0); /* Clear vblank bit if it's already high */ R128_WRITE(R128_GEN_INT_STATUS, R128_CRTC_VBLANK_INT_AK); + + dev_priv->irqh = pci_intr_establish(dev_priv->pc, dev_priv->ih, IPL_BIO, + drm_irq_handler_wrap, dev, dev_priv->dev.dv_xname); + if (dev_priv->irqh == NULL) + return (ENOENT); + return (0); } -void r128_driver_irq_uninstall(struct drm_device * dev) +void +r128_driver_irq_uninstall(struct drm_device * dev) { drm_r128_private_t *dev_priv = (drm_r128_private_t *) dev->dev_private; - if (!dev_priv) - return; /* Disable *all* interrupts */ R128_WRITE(R128_GEN_INT_CNTL, 0); + + pci_intr_disestablish(dev_priv->pc, dev_priv->irqh); } |