diff options
author | Keith Packard <keithp@keithp.com> | 2008-11-04 05:03:27 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-24 18:27:24 -0500 |
commit | 7c463586427bbbad726ba561bae4ba5acada2481 (patch) | |
tree | 0d646851c4c643fe04cf1be31dbf9d6adfc29149 /drivers/gpu/drm/i915/i915_drv.h | |
parent | ed313489badef16d700f5a3be50e8fd8f8294bc8 (diff) |
drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR.
The pipestat fields affect reporting of all vblank-related interrupts, so we
have to reset them during the irq_handler, and while enabling vblank
interrupts. Otherwise, if a pipe status field had been set to non-zero
before enabling reporting, we would never see an interrupt again.
This patch adds i915_enable_pipestat and i915_disable_pipestat to abstract
out the steps needed to change the reported interrupts.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index ef1c0b8f8d07..ed1edcf8704f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -132,6 +132,7 @@ typedef struct drm_i915_private { | |||
132 | int user_irq_refcount; | 132 | int user_irq_refcount; |
133 | /** Cached value of IMR to avoid reads in updating the bitfield */ | 133 | /** Cached value of IMR to avoid reads in updating the bitfield */ |
134 | u32 irq_mask_reg; | 134 | u32 irq_mask_reg; |
135 | u32 pipestat[2]; | ||
135 | 136 | ||
136 | int tex_lru_log_granularity; | 137 | int tex_lru_log_granularity; |
137 | int allow_batchbuffer; | 138 | int allow_batchbuffer; |
@@ -446,6 +447,13 @@ extern int i915_vblank_swap(struct drm_device *dev, void *data, | |||
446 | struct drm_file *file_priv); | 447 | struct drm_file *file_priv); |
447 | extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask); | 448 | extern void i915_enable_irq(drm_i915_private_t *dev_priv, u32 mask); |
448 | 449 | ||
450 | void | ||
451 | i915_enable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask); | ||
452 | |||
453 | void | ||
454 | i915_disable_pipestat(drm_i915_private_t *dev_priv, int pipe, u32 mask); | ||
455 | |||
456 | |||
449 | /* i915_mem.c */ | 457 | /* i915_mem.c */ |
450 | extern int i915_mem_alloc(struct drm_device *dev, void *data, | 458 | extern int i915_mem_alloc(struct drm_device *dev, void *data, |
451 | struct drm_file *file_priv); | 459 | struct drm_file *file_priv); |