From 66c9e3053f857df340a982edaa8ea57b229efeed Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 5 Nov 2003 08:13:52 +0000 Subject: - Tie the DRM to a specific device: setunique no longer succeeds when given a busid that doesn't correspond to the device the DRM is attached to. This is a breaking of backwards-compatibility only for the multiple-DRI-head case with X Servers that don't use interface 1.1. - Move irq_busid to drm_irq.h and make it only return the IRQ for the current device. Retains compatibility with previous X Servers, cleans up unnecessary code. This means no irq_busid on !__HAVE_IRQ, but can be changed if necessary. - Bump interface version to 1.2. This version when set signifies that the control ioctl should ignore the irq number passed in and enable the interrupt handler for the attached device. Otherwise it errors out when the passed-in irq is not equal to the device's. - Store the highest version the interface has been set to in the device. - Fix a recursion on DRM_LOCK in irq_uninstall on FreeBSD. This leaves irq_uninstall being done without the lock in some cases, but it was racey anyways. --- linux-core/i830_dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux-core/i830_dma.c') diff --git a/linux-core/i830_dma.c b/linux-core/i830_dma.c index 422f3ad5..626f84be 100644 --- a/linux-core/i830_dma.c +++ b/linux-core/i830_dma.c @@ -243,7 +243,7 @@ int i830_dma_cleanup(drm_device_t *dev) * may not have been called from userspace and after dev_private * is freed, it's too late. */ - if (dev->irq) DRM(irq_uninstall)(dev); + if (dev->irq_enabled) DRM(irq_uninstall)(dev); #endif if (dev->dev_private) { @@ -1546,7 +1546,7 @@ int i830_getparam( struct inode *inode, struct file *filp, unsigned int cmd, switch( param.param ) { case I830_PARAM_IRQ_ACTIVE: - value = dev->irq ? 1 : 0; + value = dev->irq_enabled; break; default: return -EINVAL; -- cgit v1.2.3