diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-01-17 04:35:15 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-24 11:22:50 -0500 |
commit | 501e01d7cd08d1fc5d876ca6e8162e19e012ac76 (patch) | |
tree | be43ec8ff44fab3399d54e76c6e08b80dfb2915f /drivers/gpu/drm/i915/i915_irq.c | |
parent | 3ca1cced9a1d89c275c7a8556d7fbf7b0e21df70 (diff) |
drm/i915: Make irq_received bool
irq_received is used as a boolean in i965_irq_handler(), so make it
bool. This also makes i965_irq_handler() closer to i915_irq_handler().
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index b67ceebe03bf..cbccadd9cd0d 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -3613,7 +3613,6 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) | |||
3613 | u32 iir, new_iir; | 3613 | u32 iir, new_iir; |
3614 | u32 pipe_stats[I915_MAX_PIPES]; | 3614 | u32 pipe_stats[I915_MAX_PIPES]; |
3615 | unsigned long irqflags; | 3615 | unsigned long irqflags; |
3616 | int irq_received; | ||
3617 | int ret = IRQ_NONE, pipe; | 3616 | int ret = IRQ_NONE, pipe; |
3618 | u32 flip_mask = | 3617 | u32 flip_mask = |
3619 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | | 3618 | I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT | |
@@ -3624,10 +3623,9 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) | |||
3624 | iir = I915_READ(IIR); | 3623 | iir = I915_READ(IIR); |
3625 | 3624 | ||
3626 | for (;;) { | 3625 | for (;;) { |
3626 | bool irq_received = (iir & ~flip_mask) != 0; | ||
3627 | bool blc_event = false; | 3627 | bool blc_event = false; |
3628 | 3628 | ||
3629 | irq_received = (iir & ~flip_mask) != 0; | ||
3630 | |||
3631 | /* Can't rely on pipestat interrupt bit in iir as it might | 3629 | /* Can't rely on pipestat interrupt bit in iir as it might |
3632 | * have been cleared after the pipestat interrupt was received. | 3630 | * have been cleared after the pipestat interrupt was received. |
3633 | * It doesn't set the bit in iir again, but it still produces | 3631 | * It doesn't set the bit in iir again, but it still produces |
@@ -3649,7 +3647,7 @@ static irqreturn_t i965_irq_handler(int irq, void *arg) | |||
3649 | DRM_DEBUG_DRIVER("pipe %c underrun\n", | 3647 | DRM_DEBUG_DRIVER("pipe %c underrun\n", |
3650 | pipe_name(pipe)); | 3648 | pipe_name(pipe)); |
3651 | I915_WRITE(reg, pipe_stats[pipe]); | 3649 | I915_WRITE(reg, pipe_stats[pipe]); |
3652 | irq_received = 1; | 3650 | irq_received = true; |
3653 | } | 3651 | } |
3654 | } | 3652 | } |
3655 | spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); | 3653 | spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags); |