aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-03 14:40:36 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-04 11:34:03 -0400
commiteeb4793779060e0ae27fc8a85b8dac2ab3620934 (patch)
tree1cab94e9758cabdb719cd35a6a31ffd71d7a9a7b /drivers/gpu/drm
parent645416f5adc87c8fae44289cdba7562f3ade8f5c (diff)
drm/i915: handle sdvo input pixel multiplier correctly again
The sdvo input timing needs to be the actual mode, the sdvo encoder automatically adjusts for the need of pixel doubling or quadrupling. This was lost in pipe config conversion of the pixel multiplier in commit 6cc5f341b5830541a1b6945435ca90c69b1b8b21 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Mar 27 00:44:53 2013 +0100 drm/i915: add pipe_config->pixel_multiplier While at it ditch the intel_ prefix from the crtc in intel_sdvo_mode_set. Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 317e058fb3cf..85037b9d4934 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1151,11 +1151,10 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
1151{ 1151{
1152 struct drm_device *dev = intel_encoder->base.dev; 1152 struct drm_device *dev = intel_encoder->base.dev;
1153 struct drm_i915_private *dev_priv = dev->dev_private; 1153 struct drm_i915_private *dev_priv = dev->dev_private;
1154 struct drm_crtc *crtc = intel_encoder->base.crtc; 1154 struct intel_crtc *crtc = to_intel_crtc(intel_encoder->base.crtc);
1155 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
1156 struct drm_display_mode *adjusted_mode = 1155 struct drm_display_mode *adjusted_mode =
1157 &intel_crtc->config.adjusted_mode; 1156 &crtc->config.adjusted_mode;
1158 struct drm_display_mode *mode = &intel_crtc->config.requested_mode; 1157 struct drm_display_mode *mode = &crtc->config.requested_mode;
1159 struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder); 1158 struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder);
1160 u32 sdvox; 1159 u32 sdvox;
1161 struct intel_sdvo_in_out_map in_out; 1160 struct intel_sdvo_in_out_map in_out;
@@ -1213,13 +1212,15 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
1213 * adjusted_mode. 1212 * adjusted_mode.
1214 */ 1213 */
1215 intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); 1214 intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode);
1215 input_dtd.part1.clock /= crtc->config.pixel_multiplier;
1216
1216 if (intel_sdvo->is_tv || intel_sdvo->is_lvds) 1217 if (intel_sdvo->is_tv || intel_sdvo->is_lvds)
1217 input_dtd.part2.sdvo_flags = intel_sdvo->dtd_sdvo_flags; 1218 input_dtd.part2.sdvo_flags = intel_sdvo->dtd_sdvo_flags;
1218 if (!intel_sdvo_set_input_timing(intel_sdvo, &input_dtd)) 1219 if (!intel_sdvo_set_input_timing(intel_sdvo, &input_dtd))
1219 DRM_INFO("Setting input timings on %s failed\n", 1220 DRM_INFO("Setting input timings on %s failed\n",
1220 SDVO_NAME(intel_sdvo)); 1221 SDVO_NAME(intel_sdvo));
1221 1222
1222 switch (intel_crtc->config.pixel_multiplier) { 1223 switch (crtc->config.pixel_multiplier) {
1223 default: 1224 default:
1224 WARN(1, "unknown pixel mutlipler specified\n"); 1225 WARN(1, "unknown pixel mutlipler specified\n");
1225 case 1: rate = SDVO_CLOCK_RATE_MULT_1X; break; 1226 case 1: rate = SDVO_CLOCK_RATE_MULT_1X; break;
@@ -1252,9 +1253,9 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
1252 } 1253 }
1253 1254
1254 if (INTEL_PCH_TYPE(dev) >= PCH_CPT) 1255 if (INTEL_PCH_TYPE(dev) >= PCH_CPT)
1255 sdvox |= SDVO_PIPE_SEL_CPT(intel_crtc->pipe); 1256 sdvox |= SDVO_PIPE_SEL_CPT(crtc->pipe);
1256 else 1257 else
1257 sdvox |= SDVO_PIPE_SEL(intel_crtc->pipe); 1258 sdvox |= SDVO_PIPE_SEL(crtc->pipe);
1258 1259
1259 if (intel_sdvo->has_hdmi_audio) 1260 if (intel_sdvo->has_hdmi_audio)
1260 sdvox |= SDVO_AUDIO_ENABLE; 1261 sdvox |= SDVO_AUDIO_ENABLE;
@@ -1264,7 +1265,7 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder)
1264 } else if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) { 1265 } else if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) {
1265 /* done in crtc_mode_set as it lives inside the dpll register */ 1266 /* done in crtc_mode_set as it lives inside the dpll register */
1266 } else { 1267 } else {
1267 sdvox |= (intel_crtc->config.pixel_multiplier - 1) 1268 sdvox |= (crtc->config.pixel_multiplier - 1)
1268 << SDVO_PORT_MULTIPLY_SHIFT; 1269 << SDVO_PORT_MULTIPLY_SHIFT;
1269 } 1270 }
1270 1271