diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-02-27 23:50:55 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-02-27 23:50:55 +0000 |
commit | e9bc5839af5067790590a780d1d396234ee550e9 (patch) | |
tree | 2a332af728234a45934996fac0cd7ec553b556d0 /sys/dev/drm/drm_drv.c | |
parent | 84d24fa52729fd3c3b646ea206314b60795807b5 (diff) | |
download | FreeBSD-src-e9bc5839af5067790590a780d1d396234ee550e9.zip FreeBSD-src-e9bc5839af5067790590a780d1d396234ee550e9.tar.gz |
Add a tuneable to allow disabling msi on drm at runtime.
Suggested by: jhb@
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/drm/drm_drv.c')
-rw-r--r-- | sys/dev/drm/drm_drv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index cc53e30..0b22491 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -134,6 +134,9 @@ static struct cdevsw drm_cdevsw = { .d_flags = D_TRACKCLOSE }; +int drm_msi = 1; /* Enable by default. */ +TUNABLE_INT("hw.drm.msi", &drm_msi); + static struct drm_msi_blacklist_entry drm_msi_blacklist[] = { {0x8086, 0x2772}, /* Intel i945G */ \ {0x8086, 0x27A2}, /* Intel i945GM */ \ @@ -222,7 +225,8 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist) dev->pci_vendor = pci_get_vendor(dev->device); dev->pci_device = pci_get_device(dev->device); - if (!drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { + if (drm_msi && + !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) { msicount = pci_msi_count(dev->device); DRM_DEBUG("MSI count = %d\n", msicount); if (msicount > 1) |