aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-11-23 12:30:39 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-11-29 08:58:53 -0500
commitaffa935440733a79c5a9eb0e5357e2564ca4b355 (patch)
tree3bc587ef85dc71c639e55ca50d27defa3c20e28e /drivers/gpu/drm/i915/intel_dp.c
parent20749730e39bba1c6100bec0e0d1a45c99db559e (diff)
drm/i915: add HAS_DDI check
And use it whenever we call code that uses the DDIs. We already have intel_ddi.c and prefix every function with intel_ddi_something instead of haswell_something, so I think replacing the checks with HAS_DDI makes more sense. Just a cosmetical change, yes I know, but I have this OCD... Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d76258dcb8f8..f2904380a6f6 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -379,7 +379,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
379 * clock divider. 379 * clock divider.
380 */ 380 */
381 if (is_cpu_edp(intel_dp)) { 381 if (is_cpu_edp(intel_dp)) {
382 if (IS_HASWELL(dev)) 382 if (HAS_DDI(dev))
383 aux_clock_divider = intel_ddi_get_cdclk_freq(dev_priv) >> 1; 383 aux_clock_divider = intel_ddi_get_cdclk_freq(dev_priv) >> 1;
384 else if (IS_VALLEYVIEW(dev)) 384 else if (IS_VALLEYVIEW(dev))
385 aux_clock_divider = 100; 385 aux_clock_divider = 100;
@@ -1791,7 +1791,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
1791 int voltage_tries, loop_tries; 1791 int voltage_tries, loop_tries;
1792 uint32_t DP = intel_dp->DP; 1792 uint32_t DP = intel_dp->DP;
1793 1793
1794 if (IS_HASWELL(dev)) 1794 if (HAS_DDI(dev))
1795 intel_ddi_prepare_link_retrain(encoder); 1795 intel_ddi_prepare_link_retrain(encoder);
1796 1796
1797 /* Write the link configuration data */ 1797 /* Write the link configuration data */
@@ -1981,7 +1981,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
1981 * intel_ddi_prepare_link_retrain will take care of redoing the link 1981 * intel_ddi_prepare_link_retrain will take care of redoing the link
1982 * train. 1982 * train.
1983 */ 1983 */
1984 if (IS_HASWELL(dev)) 1984 if (HAS_DDI(dev))
1985 return; 1985 return;
1986 1986
1987 if (WARN_ON((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0)) 1987 if (WARN_ON((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0))
@@ -2742,7 +2742,7 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
2742 intel_connector_attach_encoder(intel_connector, intel_encoder); 2742 intel_connector_attach_encoder(intel_connector, intel_encoder);
2743 drm_sysfs_connector_add(connector); 2743 drm_sysfs_connector_add(connector);
2744 2744
2745 if (IS_HASWELL(dev)) 2745 if (HAS_DDI(dev))
2746 intel_connector->get_hw_state = intel_ddi_connector_get_hw_state; 2746 intel_connector->get_hw_state = intel_ddi_connector_get_hw_state;
2747 else 2747 else
2748 intel_connector->get_hw_state = intel_connector_get_hw_state; 2748 intel_connector->get_hw_state = intel_connector_get_hw_state;