diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d9c50ff94d76..64773ce52964 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -636,7 +636,7 @@ void | |||
636 | intel_wait_for_vblank(struct drm_device *dev) | 636 | intel_wait_for_vblank(struct drm_device *dev) |
637 | { | 637 | { |
638 | /* Wait for 20ms, i.e. one cycle at 50hz. */ | 638 | /* Wait for 20ms, i.e. one cycle at 50hz. */ |
639 | udelay(20000); | 639 | mdelay(20); |
640 | } | 640 | } |
641 | 641 | ||
642 | static int | 642 | static int |
@@ -1106,6 +1106,26 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, | |||
1106 | return -EINVAL; | 1106 | return -EINVAL; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | /* SDVO TV has fixed PLL values depend on its clock range, | ||
1110 | this mirrors vbios setting. */ | ||
1111 | if (is_sdvo && is_tv) { | ||
1112 | if (adjusted_mode->clock >= 100000 | ||
1113 | && adjusted_mode->clock < 140500) { | ||
1114 | clock.p1 = 2; | ||
1115 | clock.p2 = 10; | ||
1116 | clock.n = 3; | ||
1117 | clock.m1 = 16; | ||
1118 | clock.m2 = 8; | ||
1119 | } else if (adjusted_mode->clock >= 140500 | ||
1120 | && adjusted_mode->clock <= 200000) { | ||
1121 | clock.p1 = 1; | ||
1122 | clock.p2 = 10; | ||
1123 | clock.n = 6; | ||
1124 | clock.m1 = 12; | ||
1125 | clock.m2 = 8; | ||
1126 | } | ||
1127 | } | ||
1128 | |||
1109 | if (IS_IGD(dev)) | 1129 | if (IS_IGD(dev)) |
1110 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; | 1130 | fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; |
1111 | else | 1131 | else |