summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_irq.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2014-03-05 16:20:56 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-07 22:36:58 +0100
commit77961eb984c7e5394bd29cc7be2ab0bf0cc7e7b1 (patch)
tree16b87bb1576613df8d75abc56ee2b292b21547ee /drivers/gpu/drm/i915/i915_irq.c
parentf88d42f1d0272c46390434607b0f5de3889d157d (diff)
drm/i915: power domains: add vlv power wells
Based on an early draft from Jesse. Add support for powering on/off the dynamic power wells on VLV by registering its display and dpio dynamic power wells with the power domain framework. For now power on all PHY TX lanes regardless of the actual lane configuration. Later this can be optimized when the PHY side setup enables only the required lanes. Atm, it enables all lanes in all cases. v2: - undef function local COND macro after its last use (Ville) - Take dev_priv->irq_lock around the whole sequence of intel_set_cpu_fifo_underrun_reporting_nolock() and valleyview_disable_display_irqs(). They are short and releasing the lock in between only makes proving correctness more difficult. - sanitize local var names in vlv_power_well_enabled() v3: - rebase on latest -nightly Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> [danvet: Resolve conflict due to my changes in the previous patch. Also throw in an assert_spin_locked for safety. And finally appease checkpatch.] 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index f43dae9a973..55a0a1de3a1 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -395,6 +395,8 @@ bool __intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
bool ret;
+ assert_spin_locked(&dev_priv->irq_lock);
+
ret = !intel_crtc->cpu_fifo_underrun_disabled;
if (enable == ret)