aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2014-06-20 12:29:20 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-23 01:05:34 -0400
commit9df7575f1c751a333b1989d1c7e2b9fc884d9105 (patch)
tree01771abb352a67857ef525daf65562c661ee6fe3 /drivers/gpu/drm/i915/intel_drv.h
parent9a76e4956b719ec32acdd37c80944423e4825bbf (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.h10
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);
691void gen8_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); 691void gen8_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
692void intel_runtime_pm_disable_interrupts(struct drm_device *dev); 692void intel_runtime_pm_disable_interrupts(struct drm_device *dev);
693void intel_runtime_pm_restore_interrupts(struct drm_device *dev); 693void intel_runtime_pm_restore_interrupts(struct drm_device *dev);
694static 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
694int intel_get_crtc_scanline(struct intel_crtc *crtc); 703int intel_get_crtc_scanline(struct intel_crtc *crtc);
695void i9xx_check_fifo_underruns(struct drm_device *dev); 704void i9xx_check_fifo_underruns(struct drm_device *dev);
696void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv); 705void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv);
697 706
698
699/* intel_crt.c */ 707/* intel_crt.c */
700void intel_crt_init(struct drm_device *dev); 708void intel_crt_init(struct drm_device *dev);
701 709