aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2009-11-19 22:24:16 -0500
committerEric Anholt <eric@anholt.net>2009-11-25 15:46:41 -0500
commit18f9ed12f8c977e25d65a16af8e8d73f72417ba1 (patch)
tree2e840183946aacd6bf310cbf083825d137d199b9 /drivers/gpu/drm/i915/intel_display.c
parentc8e0f93a381d1d76135e567f13a4418fce66fd95 (diff)
drm/i915: Enable LVDS downclock feature through EDID.
If more than one mode with the same resolution defined in EDID has different refresh rate, it is thought that the downclock is found for LVDS. We will program the different FPx0/1 register so that we can select dynamically between the low and high frequency. On the g4x platform we will use the CxSR feature to switch the different refresh rate if the LVDS downclock feature is supported. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 33113c7d4e49..a65838ed24b9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2869,14 +2869,25 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2869 return -EINVAL; 2869 return -EINVAL;
2870 } 2870 }
2871 2871
2872 if (limit->find_reduced_pll && dev_priv->lvds_downclock_avail) { 2872 if (is_lvds && limit->find_reduced_pll &&
2873 dev_priv->lvds_downclock_avail) {
2873 memcpy(&reduced_clock, &clock, sizeof(intel_clock_t)); 2874 memcpy(&reduced_clock, &clock, sizeof(intel_clock_t));
2874 has_reduced_clock = limit->find_reduced_pll(limit, crtc, 2875 has_reduced_clock = limit->find_reduced_pll(limit, crtc,
2875 (adjusted_mode->clock*3/4), 2876 dev_priv->lvds_downclock,
2876 refclk, 2877 refclk,
2877 &reduced_clock); 2878 &reduced_clock);
2879 if (has_reduced_clock && (clock.p != reduced_clock.p)) {
2880 /*
2881 * If the different P is found, it means that we can't
2882 * switch the display clock by using the FP0/FP1.
2883 * In such case we will disable the LVDS downclock
2884 * feature.
2885 */
2886 DRM_DEBUG_KMS("Different P is found for "
2887 "LVDS clock/downclock\n");
2888 has_reduced_clock = 0;
2889 }
2878 } 2890 }
2879
2880 /* SDVO TV has fixed PLL values depend on its clock range, 2891 /* SDVO TV has fixed PLL values depend on its clock range,
2881 this mirrors vbios setting. */ 2892 this mirrors vbios setting. */
2882 if (is_sdvo && is_tv) { 2893 if (is_sdvo && is_tv) {