Commit 26c17cf6 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Use atomic state and connector_type in i915_sink_src

DPMS is unreliable, use crtc->state.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1466431059-8919-4-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
parent b6dabe3b
...@@ -2701,7 +2701,6 @@ static int i915_sink_crc(struct seq_file *m, void *data) ...@@ -2701,7 +2701,6 @@ static int i915_sink_crc(struct seq_file *m, void *data)
{ {
struct drm_info_node *node = m->private; struct drm_info_node *node = m->private;
struct drm_device *dev = node->minor->dev; struct drm_device *dev = node->minor->dev;
struct intel_encoder *encoder;
struct intel_connector *connector; struct intel_connector *connector;
struct intel_dp *intel_dp = NULL; struct intel_dp *intel_dp = NULL;
int ret; int ret;
...@@ -2709,18 +2708,19 @@ static int i915_sink_crc(struct seq_file *m, void *data) ...@@ -2709,18 +2708,19 @@ static int i915_sink_crc(struct seq_file *m, void *data)
drm_modeset_lock_all(dev); drm_modeset_lock_all(dev);
for_each_intel_connector(dev, connector) { for_each_intel_connector(dev, connector) {
struct drm_crtc *crtc;
if (connector->base.dpms != DRM_MODE_DPMS_ON) if (!connector->base.state->best_encoder)
continue; continue;
if (!connector->base.encoder) crtc = connector->base.state->crtc;
if (!crtc->state->active)
continue; continue;
encoder = to_intel_encoder(connector->base.encoder); if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP)
if (encoder->type != INTEL_OUTPUT_EDP)
continue; continue;
intel_dp = enc_to_intel_dp(&encoder->base); intel_dp = enc_to_intel_dp(connector->base.state->best_encoder);
ret = intel_dp_sink_crc(intel_dp, crc); ret = intel_dp_sink_crc(intel_dp, crc);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment