diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2014-06-20 12:29:20 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-07-23 01:05:34 -0400 |
commit | 9df7575f1c751a333b1989d1c7e2b9fc884d9105 (patch) | |
tree | 01771abb352a67857ef525daf65562c661ee6fe3 /drivers/gpu/drm/i915/intel_drv.h | |
parent | 9a76e4956b719ec32acdd37c80944423e4825bbf (diff) |
drm/i915: add helper for checking whether IRQs are enabled
Now that we use the runtime IRQ enable/disable functions in our suspend
path, we can simply check the pm._irqs_disabled flag everywhere. So
rename it to catch the users, and add an inline for it to make the
checks clear everywhere.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index bf415df11389..8fc68c783228 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -691,11 +691,19 @@ void gen8_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); | |||
691 | void gen8_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); | 691 | void gen8_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); |
692 | void intel_runtime_pm_disable_interrupts(struct drm_device *dev); | 692 | void intel_runtime_pm_disable_interrupts(struct drm_device *dev); |
693 | void intel_runtime_pm_restore_interrupts(struct drm_device *dev); | 693 | void intel_runtime_pm_restore_interrupts(struct drm_device *dev); |
694 | static inline bool intel_irqs_enabled(struct drm_i915_private *dev_priv) | ||
695 | { | ||
696 | /* | ||
697 | * We only use drm_irq_uninstall() at unload and VT switch, so | ||
698 | * this is the only thing we need to check. | ||
699 | */ | ||
700 | return !dev_priv->pm._irqs_disabled; | ||
701 | } | ||
702 | |||
694 | int intel_get_crtc_scanline(struct intel_crtc *crtc); | 703 | int intel_get_crtc_scanline(struct intel_crtc *crtc); |
695 | void i9xx_check_fifo_underruns(struct drm_device *dev); | 704 | void i9xx_check_fifo_underruns(struct drm_device *dev); |
696 | void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv); | 705 | void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv); |
697 | 706 | ||
698 | |||
699 | /* intel_crt.c */ | 707 | /* intel_crt.c */ |
700 | void intel_crt_init(struct drm_device *dev); | 708 | void intel_crt_init(struct drm_device *dev); |
701 | 709 | ||