diff options
author | Eric Anholt <anholt@freebsd.org> | 2003-11-05 08:13:52 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2003-11-05 08:13:52 +0000 |
commit | 66c9e3053f857df340a982edaa8ea57b229efeed (patch) | |
tree | f1ba7392f422b2687952f0242c6916d1ac766fea /linux/drmP.h | |
parent | 19ee64add26773f4436440f8fa405a1011eea4c4 (diff) |
- 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.
Diffstat (limited to 'linux/drmP.h')
-rw-r--r-- | linux/drmP.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/linux/drmP.h b/linux/drmP.h index f0fc64d4..1fe9c72c 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -353,6 +353,7 @@ do { \ #define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x)) #define DRM_WAITCOUNT(dev,idx) DRM_BUFCOUNT(&dev->queuelist[idx]->waitlist) +#define DRM_IF_VERSION(maj, min) (maj << 16 | min) /** * Get the private SAREA mapping. * @@ -658,6 +659,7 @@ typedef struct drm_device { dev_t device; /**< Device number for mknod */ char *devname; /**< For /proc/interrupts */ int minor; /**< Minor device number */ + int if_version; /**< Highest interface version set */ int blocked; /**< Blocked due to VC switch? */ struct proc_dir_entry *root; /**< Root for this device's entries */ @@ -715,6 +717,7 @@ typedef struct drm_device { /** \name Context support */ /*@{*/ int irq; /**< Interrupt used by board */ + int irq_enabled; /**< True if irq handler is enabled */ __volatile__ long context_flag; /**< Context swapping flag */ __volatile__ long interrupt_flag; /**< Interruption handler flag */ __volatile__ long dma_flag; /**< DMA dispatch flag */ @@ -754,7 +757,12 @@ typedef struct drm_device { #if __REALLY_HAVE_AGP drm_agp_head_t *agp; /**< AGP data */ #endif - struct pci_dev *pdev; /**< PCI device structure */ + + struct pci_dev *pdev; /**< PCI device structure */ + int pci_domain; /**< PCI bus domain number */ + int pci_bus; /**< PCI bus number */ + int pci_slot; /**< PCI slot number */ + int pci_func; /**< PCI function number */ #ifdef __alpha__ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3) struct pci_controler *hose; @@ -844,8 +852,8 @@ extern int DRM(unbind_agp)(DRM_AGP_MEM *handle); #endif /* Misc. IOCTL support (drm_ioctl.h) */ -extern int DRM(irq_busid)(struct inode *inode, struct file *filp, - unsigned int cmd, unsigned long arg); +extern int DRM(irq_by_busid)(struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg); extern int DRM(getunique)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern int DRM(setunique)(struct inode *inode, struct file *filp, @@ -950,7 +958,7 @@ extern int DRM(control)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); #endif #if __HAVE_IRQ -extern int DRM(irq_install)( drm_device_t *dev, int irq ); +extern int DRM(irq_install)( drm_device_t *dev ); extern int DRM(irq_uninstall)( drm_device_t *dev ); extern irqreturn_t DRM(irq_handler)( DRM_IRQ_ARGS ); extern void DRM(driver_irq_preinstall)( drm_device_t *dev ); |