aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2011-10-14 17:22:25 -0400
committerKeith Packard <keithp@keithp.com>2011-10-21 02:22:03 -0400
commit1c95822afebae625f48ebabfc470cdbb50671fd5 (patch)
tree93c4e9690e06ac712d68aebe1f08914e4c2c91ea /drivers/gpu
parent260052100ef669b5374f72055379adc5da35034b (diff)
drm/i915/dp: Introduce is_cpu_edp()
The obvious counterpart to is_pch_edp(). Convert existing instances of the idiom to the new routine. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 58c827b52a29..eba1ba5a32ed 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -95,6 +95,17 @@ static bool is_pch_edp(struct intel_dp *intel_dp)
95 return intel_dp->is_pch_edp; 95 return intel_dp->is_pch_edp;
96} 96}
97 97
98/**
99 * is_cpu_edp - is the port on the CPU and attached to an eDP panel?
100 * @intel_dp: DP struct
101 *
102 * Returns true if the given DP struct corresponds to a CPU eDP port.
103 */
104static bool is_cpu_edp(struct intel_dp *intel_dp)
105{
106 return is_edp(intel_dp) && !is_pch_edp(intel_dp);
107}
108
98static struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder) 109static struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
99{ 110{
100 return container_of(encoder, struct intel_dp, base.base); 111 return container_of(encoder, struct intel_dp, base.base);
@@ -355,7 +366,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
355 * Note that PCH attached eDP panels should use a 125MHz input 366 * Note that PCH attached eDP panels should use a 125MHz input
356 * clock divider. 367 * clock divider.
357 */ 368 */
358 if (is_edp(intel_dp) && !is_pch_edp(intel_dp)) { 369 if (is_cpu_edp(intel_dp)) {
359 if (IS_GEN6(dev)) 370 if (IS_GEN6(dev))
360 aux_clock_divider = 200; /* SNB eDP input clock at 400Mhz */ 371 aux_clock_divider = 200; /* SNB eDP input clock at 400Mhz */
361 else 372 else
@@ -859,7 +870,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
859 if (intel_crtc->pipe == 1 && !HAS_PCH_CPT(dev)) 870 if (intel_crtc->pipe == 1 && !HAS_PCH_CPT(dev))
860 intel_dp->DP |= DP_PIPEB_SELECT; 871 intel_dp->DP |= DP_PIPEB_SELECT;
861 872
862 if (is_edp(intel_dp) && !is_pch_edp(intel_dp)) { 873 if (is_cpu_edp(intel_dp)) {
863 /* don't miss out required setting for eDP */ 874 /* don't miss out required setting for eDP */
864 intel_dp->DP |= DP_PLL_ENABLE; 875 intel_dp->DP |= DP_PLL_ENABLE;
865 if (adjusted_mode->clock < 200000) 876 if (adjusted_mode->clock < 200000)