svn commit: r189128 - head/sys/dev/drm

Robert Noland rnoland at FreeBSD.org
Fri Feb 27 15:50:56 PST 2009


Author: rnoland
Date: Fri Feb 27 23:50:55 2009
New Revision: 189128
URL: http://svn.freebsd.org/changeset/base/189128

Log:
  Add a tuneable to allow disabling msi on drm at runtime.
  
  Suggested by:	jhb@
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/drm/drm_drv.c

Modified: head/sys/dev/drm/drm_drv.c
==============================================================================
--- head/sys/dev/drm/drm_drv.c	Fri Feb 27 23:49:26 2009	(r189127)
+++ head/sys/dev/drm/drm_drv.c	Fri Feb 27 23:50:55 2009	(r189128)
@@ -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_i
 	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)


More information about the svn-src-head mailing list