summaryrefslogtreecommitdiff
path: root/linux/i810.h
diff options
context:
space:
mode:
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 ed25b2a99..a5152bc0a 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: