summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2013-07-01 15:50:17 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-07-02 09:44:29 +0200
commit510d5f2f6b97eccbfa08234e21b0577c1748807d (patch)
treec2a480cab67ce3ef5f8aceb9a379bf5984faa94a /drivers/gpu/drm/i915/intel_display.c
parent6f02488e3a5cbd76974b9d56140b11f3aa012124 (diff)
downloadlwn-510d5f2f6b97eccbfa08234e21b0577c1748807d.tar.gz
lwn-510d5f2f6b97eccbfa08234e21b0577c1748807d.zip
drm/i915: split encoder get_config calls from crtc get_clock calls
This should help on HSW, where we don't currently have a get_clock call. Reported-by: Paulo Zanoni <przanoni@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 6b0013cc962f..76796b179170 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8377,14 +8377,13 @@ check_crtc_state(struct drm_device *dev)
base.head) {
if (encoder->base.crtc != &crtc->base)
continue;
- if (encoder->get_config &&
- dev_priv->display.get_clock) {
+ if (encoder->get_config)
encoder->get_config(encoder, &pipe_config);
- dev_priv->display.get_clock(crtc,
- &pipe_config);
- }
}
+ if (dev_priv->display.get_clock)
+ dev_priv->display.get_clock(crtc, &pipe_config);
+
WARN(crtc->active != active,
"crtc active state doesn't match with hw state "
"(expected %i, found %i)\n", crtc->active, active);
@@ -9956,12 +9955,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
if (encoder->get_hw_state(encoder, &pipe)) {
crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
encoder->base.crtc = &crtc->base;
- if (encoder->get_config &&
- dev_priv->display.get_clock) {
+ if (encoder->get_config)
encoder->get_config(encoder, &crtc->config);
- dev_priv->display.get_clock(crtc,
- &crtc->config);
- }
} else {
encoder->base.crtc = NULL;
}
@@ -9974,6 +9969,15 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
pipe);
}
+ list_for_each_entry(crtc, &dev->mode_config.crtc_list,
+ base.head) {
+ if (!crtc->active)
+ continue;
+ if (dev_priv->display.get_clock)
+ dev_priv->display.get_clock(crtc,
+ &crtc->config);
+ }
+
list_for_each_entry(connector, &dev->mode_config.connector_list,
base.head) {
if (connector->get_hw_state(connector)) {