@@ -6040,7 +6040,14 @@ static void ironlake_crtc_clock_get(struct intel_crtc *crtc,
* This value does not include pixel_multiplier. We will fix
* port_clock in the encoder's get_config() function if necessary.
*/
- pipe_config->port_clock = pipe_config->adjusted_mode.clock = clock;
+ pipe_config->adjusted_mode.clock = clock;
+
+ /*
+ * We get called before encoder get_config() for pch encoders,
+ * after for non-pch. Don't clobber port_clock in the latter case.
+ */
+ if (!pipe_config->port_clock)
+ pipe_config->port_clock = clock;
}
static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
@@ -6105,6 +6112,8 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
pipe_config->pixel_multiplier =
((tmp & PLL_REF_SDVO_HDMI_MULTIPLIER_MASK)
>> PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT) + 1;
+
+ ironlake_crtc_clock_get(crtc, pipe_config);
} else {
pipe_config->pixel_multiplier = 1;
}
@@ -6113,8 +6122,6 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
ironlake_get_pfit_config(crtc, pipe_config);
- ironlake_crtc_clock_get(crtc, pipe_config);
-
return true;
}
@@ -8827,6 +8834,9 @@ check_crtc_state(struct drm_device *dev)
encoder->get_config(encoder, &pipe_config);
}
+ if (HAS_PCH_SPLIT(dev) && !pipe_config.has_pch_encoder)
+ ironlake_crtc_clock_get(crtc, &pipe_config);
+
WARN(crtc->active != active,
"crtc active state doesn't match with hw state "
"(expected %i, found %i)\n", crtc->active, active);
@@ -10479,6 +10489,13 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
pipe);
}
+ if (HAS_PCH_SPLIT(dev)) {
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) {
+ if (!crtc->config.has_pch_encoder)
+ ironlake_crtc_clock_get(crtc, &crtc->config);
+ }
+ }
+
list_for_each_entry(connector, &dev->mode_config.connector_list,
base.head) {
if (connector->get_hw_state(connector)) {