blob: c9f16d646cb78052455e641b48d2071b0c6d56ca [file] [log] [blame]
From 4c5e3cb13c3d32e550f87b4c7c088330be170a2a Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Mon, 1 Jul 2013 15:50:17 -0700
Subject: 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>
(cherry picked from commit 510d5f2f6b97eccbfa08234e21b0577c1748807d)
(cherry picked from drm-intel-next-queued)
Signed-off-by: James Ausmus <james.ausmus@intel.com>
Conflicts:
drivers/gpu/drm/i915/intel_display.c
(context changes)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8380,14 +8380,13 @@ check_crtc_state(struct drm_device *dev)
if (encoder->base.crtc != &crtc->base)
continue;
if (encoder->get_config &&
- encoder->get_hw_state(encoder, &pipe) &&
- dev_priv->display.get_clock) {
+ encoder->get_hw_state(encoder, &pipe))
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);
@@ -9982,12 +9981,8 @@ static void intel_modeset_readout_hw_sta
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;
}
@@ -10000,6 +9995,15 @@ static void intel_modeset_readout_hw_sta
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)) {