From patchwork Wed Mar 24 01:22:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chase Douglas X-Patchwork-Id: 48375 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 7518AB7CCD for ; Wed, 24 Mar 2010 12:22:37 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NuFIg-0002eS-Pt; Wed, 24 Mar 2010 01:22:26 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1NuFIf-0002eM-K5 for kernel-team@lists.ubuntu.com; Wed, 24 Mar 2010 01:22:25 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NuFIf-0005r0-HW for ; Wed, 24 Mar 2010 01:22:25 +0000 Received: from cpe-98-31-46-159.woh.res.rr.com ([98.31.46.159] helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1NuFIf-0006pS-8G for kernel-team@lists.ubuntu.com; Wed, 24 Mar 2010 01:22:25 +0000 From: Chase Douglas To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] (pre-stable) drm/nouveau: report unknown connector state if lid closed Date: Tue, 23 Mar 2010 21:22:21 -0400 Message-Id: <1269393741-2970-2-git-send-email-chase.douglas@canonical.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1269393741-2970-1-git-send-email-chase.douglas@canonical.com> References: <1269393741-2970-1-git-send-email-chase.douglas@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Ben Skeggs 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 (cherry picked from commit b30083bdb990bcc2829fce83d871a86059ff4fc1) BugLink: http://bugs.launchpad.net/bugs/523072 Signed-off-by: Chase Douglas --- drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index d2f6335..a378bc3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -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. */