]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nouveau: report unknown connector state if lid closed
authorBen Skeggs <bskeggs@redhat.com>
Thu, 25 Feb 2010 02:12:09 +0000 (12:12 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 23:01:52 +0000 (16:01 -0700)
commit b30083bdb990bcc2829fce83d871a86059ff4fc1 upstream.

This is in preference to disconnected.  If there's no other outputs
connected this will cause LVDS to be programmed even with the lid
closed rather than having X fail to start because of no available
outputs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/nouveau/nouveau_connector.c

index d2f63353ea9715f3be342d369e282beec55d86fb..a378bc3cd7ddfe27887d896587a7dfd2c80db7ee 100644 (file)
@@ -239,12 +239,14 @@ nouveau_connector_detect(struct drm_connector *connector)
        if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
                nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
        if (nv_encoder && nv_connector->native_mode) {
+               unsigned status = connector_status_connected;
+
 #ifdef CONFIG_ACPI
                if (!nouveau_ignorelid && !acpi_lid_open())
-                       return connector_status_disconnected;
+                       status = connector_status_unknown;
 #endif
                nouveau_connector_set_encoder(connector, nv_encoder);
-               return connector_status_connected;
+               return status;
        }
 
        /* Cleanup the previous EDID block. */