kern/133554: [sis] [drm] [panic] page fault in sis.ko / drm.ko
Mark Linimon
linimon at lonesome.com
Sat Apr 18 20:40:03 UTC 2009
The following reply was made to PR kern/133554; it has been noted by GNATS.
From: Mark Linimon <linimon at lonesome.com>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/133554: [sis] [drm] [panic] page fault in sis.ko / drm.ko
Date: Sat, 18 Apr 2009 15:38:12 -0500
----- Forwarded message from Robert Noland <rnoland at FreeBSD.org> -----
From: Robert Noland <rnoland at FreeBSD.org>
To: cpghost <cpghost at cordula.ws>
Subject: Re: page fault in sis.ko / drm.ko
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 <rnoland at 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);
----- End forwarded message -----
More information about the freebsd-bugs
mailing list