Linus Torvalds wrote: > On Tue, 1 Oct 2002, Keith Whitwell wrote: > >>Sounds like you aren't getting irq's, for some reason, and it is falling back >>to busy waiting. >> >>The question is why aren't you getting irq's? >> > > Keith, are you even asking the kernel to look up (and possibly enable) the > irq for you? > > The magic word isn't "please", it's "pci_enable_device(dev)", which will > check that all resources are allocated and enabled, including things like > trying to route irq's using the PIRQ table (or ACPI, or whatever). > > Doing a quick grep through the drm stuff doesn't show a single caller.. > > Btw, I'd like to also point out that some of DRI PCI bus handling seems > fundamentally broken. Like the notion that you can specify the device by > bus number, device and fn. Those days are past, I'm afraid, and were never > true on some other platforms. It can be a much more complicated tree, with > multiple independent PCI segments. You don't see that yet on regular PC's, > but get ready (and X in general should probably stop thinking that it can > do things like PCI configuration from user space). >
Sorry for the delay replying. This is well outside any area I claim to know anything about, so I'm kind of groping around at the moment. Would the appropriate place to call 'pci_enable_device' be just after a successful call to (deprecated) pci_find_slot() ? ie, something like this? Keith --- drm_ioctl.h 25 Sep 2001 09:32:15 -0000 1.9 +++ drm_ioctl.h 3 Oct 2002 09:50:36 -0000 @@ -32,6 +32,7 @@ #define __NO_VERSION__ #include "drmP.h" + int DRM(irq_busid)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) { @@ -41,6 +42,11 @@ if (copy_from_user(&p, (drm_irq_busid_t *)arg, sizeof(p))) return -EFAULT; dev = pci_find_slot(p.busnum, PCI_DEVFN(p.devnum, p.funcnum)); + if (!pci_enable_device(dev)) { + DRM_ERROR("pci_enable_device failed for %d:%d:%d\n", + p.busnum, p.devnum, p.funcnum); + return -EBUSY; + } if (dev) p.irq = dev->irq; else p.irq = 0; DRM_DEBUG("%d:%d:%d => IRQ %d\n", ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel