Commit e95c8438 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: fixup load-detect on enabled, but not active pipe

Somehow we have a fast-path that tries to avoid going through
the load-detect code when the encode already has a crtc associated.
But this fails horribly when the crtc is off. The load detect pipe
itself manages this case well (and also does not forget to restore the
dpms state), so just rip out this special case.

The issue seems to go back all the way to the commit that originally
introduced load-detection on the vga output:

commit e4a5d54f
Author: Ma Ling <ling.ma@intel.com>
Date:   Tue May 26 11:31:00 2009 +0800

    drm/i915: Add support for VGA load detection (pre-945).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020Reported-by: default avatarJean Delvare <khali@linux-fr.org>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 66f75a5d
...@@ -430,8 +430,8 @@ intel_crt_detect(struct drm_connector *connector, bool force) ...@@ -430,8 +430,8 @@ intel_crt_detect(struct drm_connector *connector, bool force)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct intel_crt *crt = intel_attached_crt(connector); struct intel_crt *crt = intel_attached_crt(connector);
struct drm_crtc *crtc;
enum drm_connector_status status; enum drm_connector_status status;
struct intel_load_detect_pipe tmp;
if (I915_HAS_HOTPLUG(dev)) { if (I915_HAS_HOTPLUG(dev)) {
if (intel_crt_detect_hotplug(connector)) { if (intel_crt_detect_hotplug(connector)) {
...@@ -450,23 +450,16 @@ intel_crt_detect(struct drm_connector *connector, bool force) ...@@ -450,23 +450,16 @@ intel_crt_detect(struct drm_connector *connector, bool force)
return connector->status; return connector->status;
/* for pre-945g platforms use load detect */ /* for pre-945g platforms use load detect */
crtc = crt->base.base.crtc; if (intel_get_load_detect_pipe(&crt->base, connector, NULL,
if (crtc && crtc->enabled) { &tmp)) {
status = intel_crt_load_detect(crt); if (intel_crt_detect_ddc(connector))
} else { status = connector_status_connected;
struct intel_load_detect_pipe tmp; else
status = intel_crt_load_detect(crt);
if (intel_get_load_detect_pipe(&crt->base, connector, NULL, intel_release_load_detect_pipe(&crt->base, connector,
&tmp)) { &tmp);
if (intel_crt_detect_ddc(connector)) } else
status = connector_status_connected; status = connector_status_unknown;
else
status = intel_crt_load_detect(crt);
intel_release_load_detect_pipe(&crt->base, connector,
&tmp);
} else
status = connector_status_unknown;
}
return status; return status;
} }
......
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