diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-11 02:28:04 +0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-09-11 03:10:21 +0400 |
commit | b42d4c5c6a872815d711e5d51a600f5122c38eee (patch) | |
tree | 3cf56dff583ec83110d6d20466892642e71a9699 /drivers/gpu/drm/i915/intel_lvds.c | |
parent | c1c7af60892070e4b82ad63bbfb95ae745056de0 (diff) | |
download | linux-b42d4c5c6a872815d711e5d51a600f5122c38eee.tar.xz |
drm/i915: use ACPI LID status for LVDS ->detect hook
We can't load or hotplug detect LVDS like we can other outputs, but if
there's a lid device present we can use it as a proxy. This allows the
LFP state to be determined at ->detect time, making configurations
requiring manual intervention today "just work" assuming the lid device
status is correct.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index e190ff792bf0..90f69d4717e9 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -589,12 +589,18 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, /** * Detect the LVDS connection. * - * This always returns CONNECTOR_STATUS_CONNECTED. This connector should only have - * been set up if the LVDS was actually connected anyway. + * Since LVDS doesn't have hotlug, we use the lid as a proxy. Open means + * connected and closed means disconnected. We also send hotplug events as + * needed, using lid status notification from the input layer. */ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector) { - return connector_status_connected; + enum drm_connector_status status = connector_status_connected; + + if (!acpi_lid_open()) + status = connector_status_disconnected; + + return status; } /** |