|
@@ -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;
|
|
|
}
|
|
|
|
|
|
/**
|