diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-24 17:59:51 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-03 05:18:19 -0400 |
commit | bbba0a9712be1c8e970fc66fc3becad0ce809e4f (patch) | |
tree | 19f1056d1a915f9632ca27d8121a8512ce6fabba | |
parent | 38bde18045afe854f389961846d64c4b3f86105f (diff) |
drm/i915: Inline I915_INTERRUPT_ENABLE_FIX
Since there is only one remaining user of I915_INTERRUPT_ENABLE_FIX,
expand it at the callsite. Quoting Jesse Barnes:
"I'd really like to get rid of these defines at the top of i915_irq.c.
Some are unused and the others just make you check for the right bits
everytime your read the code."
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: Add bikeshed suggested by Jesse.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 51f872084efa..0d5e3f657431 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -39,24 +39,6 @@ | |||
39 | 39 | ||
40 | #define MAX_NOPID ((u32)~0) | 40 | #define MAX_NOPID ((u32)~0) |
41 | 41 | ||
42 | /** | ||
43 | * Interrupts that are always left unmasked. | ||
44 | * | ||
45 | * Since pipe events are edge-triggered from the PIPESTAT register to IIR, | ||
46 | * we leave them always unmasked in IMR and then control enabling them through | ||
47 | * PIPESTAT alone. | ||
48 | */ | ||
49 | #define I915_INTERRUPT_ENABLE_FIX \ | ||
50 | (I915_ASLE_INTERRUPT | \ | ||
51 | I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | \ | ||
52 | I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | \ | ||
53 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | \ | ||
54 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT | \ | ||
55 | I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT) | ||
56 | |||
57 | /** Interrupts that we mask and unmask at runtime. */ | ||
58 | #define I915_INTERRUPT_ENABLE_VAR (I915_USER_INTERRUPT | I915_BSD_USER_INTERRUPT) | ||
59 | |||
60 | #define I915_PIPE_VBLANK_STATUS (PIPE_START_VBLANK_INTERRUPT_STATUS |\ | 42 | #define I915_PIPE_VBLANK_STATUS (PIPE_START_VBLANK_INTERRUPT_STATUS |\ |
61 | PIPE_VBLANK_INTERRUPT_STATUS) | 43 | PIPE_VBLANK_INTERRUPT_STATUS) |
62 | 44 | ||
@@ -2581,13 +2563,24 @@ static void i965_irq_preinstall(struct drm_device * dev) | |||
2581 | static int i965_irq_postinstall(struct drm_device *dev) | 2563 | static int i965_irq_postinstall(struct drm_device *dev) |
2582 | { | 2564 | { |
2583 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; | 2565 | drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; |
2584 | u32 enable_mask = I915_INTERRUPT_ENABLE_FIX | I915_INTERRUPT_ENABLE_VAR; | 2566 | u32 enable_mask; |
2585 | u32 error_mask; | 2567 | u32 error_mask; |
2586 | 2568 | ||
2587 | dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; | 2569 | dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; |
2588 | 2570 | ||
2589 | /* Unmask the interrupts that we always want on. */ | 2571 | /* Unmask the interrupts that we always want on. */ |
2590 | dev_priv->irq_mask = ~I915_INTERRUPT_ENABLE_FIX; | 2572 | dev_priv->irq_mask = ~(I915_ASLE_INTERRUPT | |
2573 | I915_DISPLAY_PIPE_A_EVENT_INTERRUPT | | ||
2574 | I915_DISPLAY_PIPE_B_EVENT_INTERRUPT | | ||
2575 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | | ||
2576 | I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT | | ||
2577 | I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT); | ||
2578 | |||
2579 | enable_mask = ~dev_priv->irq_mask; | ||
2580 | enable_mask |= I915_USER_INTERRUPT; | ||
2581 | |||
2582 | if (IS_G4X(dev)) | ||
2583 | enable_mask |= I915_BSD_USER_INTERRUPT; | ||
2591 | 2584 | ||
2592 | dev_priv->pipestat[0] = 0; | 2585 | dev_priv->pipestat[0] = 0; |
2593 | dev_priv->pipestat[1] = 0; | 2586 | dev_priv->pipestat[1] = 0; |