On Sat, 2009-04-18 at 19:13 +0200, cpghost wrote:
> Could a drm guru please have a look at kern/133554?
> 
> Thanks,
> -cpghost.

Give this patch a try, it looks like the sis driver doesn't have irq's.

robert.

-- 
Robert Noland <rnol...@freebsd.org>
FreeBSD
Index: dev/drm/drm_drv.c
===================================================================
--- dev/drm/drm_drv.c	(revision 190987)
+++ dev/drm/drm_drv.c	(working copy)
@@ -134,7 +134,7 @@
 	.d_flags =	D_TRACKCLOSE
 };
 
-int drm_msi = 1;	/* Enable by default. */
+static int drm_msi = 1;	/* Enable by default. */
 TUNABLE_INT("hw.drm.msi", &drm_msi);
 
 static struct drm_msi_blacklist_entry drm_msi_blacklist[] = {
@@ -228,28 +228,31 @@
 	dev->pci_vendor = pci_get_vendor(dev->device);
 	dev->pci_device = pci_get_device(dev->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)
-			msicount = 1;
+	if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) {
+		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)
+				msicount = 1;
 
-		if (pci_alloc_msi(dev->device, &msicount) == 0) {
-			DRM_INFO("MSI enabled %d message(s)\n", msicount);
-			dev->msi_enabled = 1;
-			dev->irqrid = 1;
+			if (pci_alloc_msi(dev->device, &msicount) == 0) {
+				DRM_INFO("MSI enabled %d message(s)\n",
+				    msicount);
+				dev->msi_enabled = 1;
+				dev->irqrid = 1;
+			}
 		}
-	}
 
-	dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ,
-	    &dev->irqrid, RF_SHAREABLE);
-	if (!dev->irqr) {
-		return ENOENT;
+		dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ,
+		    &dev->irqrid, RF_SHAREABLE);
+		if (!dev->irqr) {
+			return ENOENT;
+		}
+
+		dev->irq = (int) rman_get_start(dev->irqr);
 	}
 
-	dev->irq = (int) rman_get_start(dev->irqr);
-
 	mtx_init(&dev->dev_lock, "drmdev", NULL, MTX_DEF);
 	mtx_init(&dev->irq_lock, "drmirq", NULL, MTX_DEF);
 	mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF);

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to