summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
authorRobert Noland <rnoland@2hip.net>2009-02-27 17:52:08 -0600
committerRobert Noland <rnoland@2hip.net>2009-02-27 18:16:18 -0600
commitad64ff30d0e85486bba8fb6f0e2fcb1caa06fd5c (patch)
tree414cb40a686627dec0ddbaee08de5a08ae40371e /bsd-core
parent957b10695b619d6ed2f1098b00502395d9a3c149 (diff)
FreeBSD: Introduce a kernel tuneable to disable msi at boot time.
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drm_drv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 794f32ea..d4d50e6a 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -131,6 +131,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 */ \
@@ -215,7 +218,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)