[PATCH 12/17] drm/i915: Don't kick the power seqeuncer just to check if we have vdd/panel power

ville.syrjala
2014-10-16T18:30:05Z

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

If there's no power sequencer assigned to the port currently we can't
very well have vdd or panel power enabled either. If we would try to
check that from the pps registers we'd need to pick a power seqeuncer
and kick it. So let's skip the register read and the kick.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 74cf827..c9a1600 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -634,6 +634,10 @@ static bool edp_have_panel_power(struct intel_dp *intel_dp)

lockdep_assert_held(&dev_priv->pps_mutex);

+ if (IS_VALLEYVIEW(dev) &&
+ intel_dp->pps_pipe == INVALID_PIPE)
+ return false;
+
return (I915_READ(_pp_stat_reg(intel_dp)) & PP_ON) != 0;
}

@@ -644,6 +648,10 @@ static bool edp_have_panel_vdd(struct intel_dp *intel_dp)

lockdep_assert_held(&dev_priv->pps_mutex);

+ if (IS_VALLEYVIEW(dev) &&
+ intel_dp->pps_pipe == INVALID_PIPE)
+ return false;
+
return I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD;
}

--
2.0.4