From patchwork Mon Mar 11 03:54:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Xiong Y" X-Patchwork-Id: 2246421 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 71FC63FC8F for ; Mon, 11 Mar 2013 03:54:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 83BD4E6344 for ; Sun, 10 Mar 2013 20:54:35 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id DA620E6201 for ; Sun, 10 Mar 2013 20:54:26 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 10 Mar 2013 20:54:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,819,1355126400"; d="scan'208";a="268262514" Received: from fmsmsx104.amr.corp.intel.com ([10.19.9.35]) by azsmga001.ch.intel.com with ESMTP; 10 Mar 2013 20:54:14 -0700 Received: from fmsmsx152.amr.corp.intel.com (10.19.17.221) by FMSMSX104.amr.corp.intel.com (10.19.9.35) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sun, 10 Mar 2013 20:54:14 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx152.amr.corp.intel.com (10.19.17.221) with Microsoft SMTP Server (TLS) id 14.1.355.2; Sun, 10 Mar 2013 20:54:13 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.170]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.85]) with mapi id 14.01.0355.002; Mon, 11 Mar 2013 11:54:12 +0800 From: "Zhang, Xiong Y" To: "intel-gfx@lists.freedesktop.org" Thread-Topic: [Intel-gfx] [PATCH] drm/i915: ignore hotplug event across suspend Thread-Index: Ac4eDBbLV4QKP2A+RQ6uE2/DT1fc+A== Date: Mon, 11 Mar 2013 03:54:11 +0000 Message-ID: <8082FF9BCB2B054996454E47167FF4ECCA8049@SHSMSX102.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915: ignore hotplug event across suspend X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org when system enter suspend, hibernate and poweroff state, it will disable modeset firstly, then disable irq, but some system generate hotplug event between disable modeset and disable irq, this will result in S3, S4 failure. So this hotplug event should be ignored. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61508 Signed-off-by: Xiong Zhang --- drivers/gpu/drm/i915/i915_irq.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 2139714..68cc7a7 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -290,6 +290,12 @@ static void i915_hotplug_work_func(struct work_struct *work) struct drm_device *dev = dev_priv->dev; struct drm_mode_config *mode_config = &dev->mode_config; struct intel_encoder *encoder; + + /* some system generate hotplug envent when system enter sleep state. + * it should be ignored. + */ + if (dev_priv->mm.suspended) + return; /* HPD irq before everything is fully set up. */ if (!dev_priv->enable_hotplug_processing)