summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/drm_irq.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-02-25 18:54:35 +0000
committerrnoland <rnoland@FreeBSD.org>2009-02-25 18:54:35 +0000
commit6a02e32edec73682a5191a32b32f2315d0d57b16 (patch)
treed0d0e5533784addaee97dba09c9bc2ba1aaa9e6b /sys/dev/drm/drm_irq.c
parentede7b46946b333697d8d0a56b6db05c8f8084e41 (diff)
downloadFreeBSD-src-6a02e32edec73682a5191a32b32f2315d0d57b16.zip
FreeBSD-src-6a02e32edec73682a5191a32b32f2315d0d57b16.tar.gz
Turn on MSI if the card supports it. There is a blacklist for chips
which report that they are capable of MSI, but don't work correctly. MFC after: 2 weeks
Diffstat (limited to 'sys/dev/drm/drm_irq.c')
-rw-r--r--sys/dev/drm/drm_irq.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/dev/drm/drm_irq.c b/sys/dev/drm/drm_irq.c
index 9421302..54392ae 100644
--- a/sys/dev/drm/drm_irq.c
+++ b/sys/dev/drm/drm_irq.c
@@ -172,13 +172,6 @@ int drm_irq_install(struct drm_device *dev)
DRM_UNLOCK();
/* Install handler */
- dev->irqrid = 0;
- dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ,
- &dev->irqrid, RF_SHAREABLE);
- if (!dev->irqr) {
- retcode = ENOENT;
- goto err;
- }
#if __FreeBSD_version >= 700031
retcode = bus_setup_intr(dev->device, dev->irqr,
INTR_TYPE_TTY | INTR_MPSAFE,
@@ -200,25 +193,17 @@ int drm_irq_install(struct drm_device *dev)
err:
DRM_LOCK();
dev->irq_enabled = 0;
- if (dev->irqrid != 0) {
- bus_release_resource(dev->device, SYS_RES_IRQ, dev->irqrid,
- dev->irqr);
- dev->irqrid = 0;
- }
DRM_UNLOCK();
+
return retcode;
}
int drm_irq_uninstall(struct drm_device *dev)
{
- int irqrid;
-
if (!dev->irq_enabled)
return EINVAL;
dev->irq_enabled = 0;
- irqrid = dev->irqrid;
- dev->irqrid = 0;
DRM_DEBUG("irq=%d\n", dev->irq);
@@ -226,7 +211,6 @@ int drm_irq_uninstall(struct drm_device *dev)
DRM_UNLOCK();
bus_teardown_intr(dev->device, dev->irqr, dev->irqh);
- bus_release_resource(dev->device, SYS_RES_IRQ, irqrid, dev->irqr);
DRM_LOCK();
drm_vblank_cleanup(dev);
OpenPOWER on IntegriCloud