summaryrefslogtreecommitdiff
path: root/linux/i810.h
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2001-06-18 12:59:42 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2001-06-18 12:59:42 +0000
commit3a410059b43027c08bcb0fef307dd4ee7734197e (patch)
tree39f50c57ebef8e38881fc69cf4dcc704170bec5a /linux/i810.h
parentd87c873df05eb3a110316c7af2358553fa7f988e (diff)
Enable shared IRQs in DMA template, use in i810 driver.
Diffstat (limited to 'linux/i810.h')
-rw-r--r--linux/i810.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/linux/i810.h b/linux/i810.h
index ed25b2a9..a5152bc0 100644
--- a/linux/i810.h
+++ b/linux/i810.h
@@ -62,9 +62,10 @@
#define __HAVE_DMA_IRQ 1
#define __HAVE_DMA_IRQ_BH 1
+#define __HAVE_SHARED_IRQ 1
#define DRIVER_PREINSTALL() do { \
drm_i810_private_t *dev_priv = \
- (drm_i810_private_t *)dev->dev_private; \
+ (drm_i810_private_t *)dev->dev_private; \
u16 tmp; \
tmp = I810_READ16( I810REG_HWSTAM ); \
tmp = tmp & 0x6000; \
@@ -80,7 +81,7 @@
#define DRIVER_POSTINSTALL() do { \
drm_i810_private_t *dev_priv = \
- (drm_i810_private_t *)dev->dev_private; \
+ (drm_i810_private_t *)dev->dev_private; \
u16 tmp; \
tmp = I810_READ16( I810REG_INT_ENABLE_R ); \
tmp = tmp & 0x6000; \
@@ -90,15 +91,18 @@
#define DRIVER_UNINSTALL() do { \
drm_i810_private_t *dev_priv = \
- (drm_i810_private_t *)dev->dev_private; \
+ (drm_i810_private_t *)dev->dev_private; \
u16 tmp; \
- tmp = I810_READ16( I810REG_INT_IDENTITY_R ); \
- tmp = tmp & ~(0x6000); /* Clear all interrupts */ \
- if ( tmp != 0 ) I810_WRITE16( I810REG_INT_IDENTITY_R, tmp ); \
+ if ( dev_priv ) { \
+ tmp = I810_READ16( I810REG_INT_IDENTITY_R ); \
+ tmp = tmp & ~(0x6000); /* Clear all interrupts */ \
+ if ( tmp != 0 ) \
+ I810_WRITE16( I810REG_INT_IDENTITY_R, tmp ); \
\
- tmp = I810_READ16( I810REG_INT_ENABLE_R ); \
- tmp = tmp & 0x6000; /* Disable all interrupts */ \
- I810_WRITE16( I810REG_INT_ENABLE_R, tmp ); \
+ tmp = I810_READ16( I810REG_INT_ENABLE_R ); \
+ tmp = tmp & 0x6000; /* Disable all interrupts */ \
+ I810_WRITE16( I810REG_INT_ENABLE_R, tmp ); \
+ } \
} while (0)
/* Buffer customization: