From patchwork Wed Nov 25 09:34:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 62734 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAP9ajuW025894 for ; Wed, 25 Nov 2009 09:36:45 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 61F019E8A8; Wed, 25 Nov 2009 01:36:44 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id E52239E893 for ; Wed, 25 Nov 2009 01:36:41 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 25 Nov 2009 01:36:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,285,1257148800"; d="scan'208";a="470433986" Received: from yakui_zhao.sh.intel.com (HELO [10.239.13.135]) ([10.239.13.135]) by orsmga002.jf.intel.com with ESMTP; 25 Nov 2009 01:53:40 -0800 From: ykzhao To: Dirk Hohndel In-Reply-To: <1258909908.2898.9.camel@dhohndel-mobl.amr.corp.intel.com> References: <1258909908.2898.9.camel@dhohndel-mobl.amr.corp.intel.com> Organization: Intel Open Source Technology Center Date: Wed, 25 Nov 2009 17:34:34 +0800 Message-Id: <1259141674.2552.17.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 (2.22.1-2.fc9) Cc: "intel-gfx@lists.freedesktop.org" Subject: Re: [Intel-gfx] display stays turned off after lid reopen X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org check and update the status of LVDS connector after receiving the LID notication event. --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_lvds.c | 9 +++++++++ 2 files changed, 11 insertions(+) Index: linux-2.6/drivers/gpu/drm/i915/i915_drv.h =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/i915_drv.h 2009-11-25 16:56:16.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/i915_drv.h 2009-11-25 16:59:39.000000000 +0800 @@ -543,6 +543,8 @@ struct timer_list idle_timer; bool busy; u16 orig_clock; + /* check the connector status after receiving the LID event */ + struct drm_connector *int_lvds_connector; } drm_i915_private_t; /** driver private structure attached to each drm_gem_object */ Index: linux-2.6/drivers/gpu/drm/i915/intel_lvds.c =================================================================== --- linux-2.6.orig/drivers/gpu/drm/i915/intel_lvds.c 2009-11-25 16:56:16.000000000 +0800 +++ linux-2.6/drivers/gpu/drm/i915/intel_lvds.c 2009-11-25 17:26:34.000000000 +0800 @@ -679,7 +679,14 @@ struct drm_i915_private *dev_priv = container_of(nb, struct drm_i915_private, lid_notifier); struct drm_device *dev = dev_priv->dev; + struct drm_connector *connector = dev_priv->int_lvds_connector; + /* + * check and update the status of LVDS connector after receiving + * the LID nofication event. + */ + if (connector) + connector->status = connector->funcs->detect(connector); if (!acpi_lid_open()) { dev_priv->modeset_on_lid = 1; return NOTIFY_OK; @@ -1085,6 +1092,8 @@ DRM_DEBUG_KMS("lid notifier registration failed\n"); dev_priv->lid_notifier.notifier_call = NULL; } + /* keep the LVDS connector */ + dev_priv->int_lvds_connector = connector; drm_sysfs_connector_add(connector); return;