From patchwork Sat Jul 27 17:43:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuansheng Liu X-Patchwork-Id: 2834594 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCD059F4D4 for ; Sat, 27 Jul 2013 08:23:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC55D20131 for ; Sat, 27 Jul 2013 08:23:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B581820136 for ; Sat, 27 Jul 2013 08:23:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F971E64EE for ; Sat, 27 Jul 2013 01:23:44 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id BD4DFE5EAC; Sat, 27 Jul 2013 01:23:33 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 27 Jul 2013 01:20:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,756,1367996400"; d="scan'208";a="352725851" Received: from cliu38-desktop-build.sh.intel.com (HELO [10.239.67.204]) ([10.239.67.204]) by orsmga001.jf.intel.com with ESMTP; 27 Jul 2013 01:23:32 -0700 From: Chuansheng Liu To: daniel.vetter@ffwll.ch, airlied@linux.ie Date: Sun, 28 Jul 2013 01:43:02 +0800 Message-ID: <1374946982.28551.4.camel@cliu38-desktop-build> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Cc: intel-gfx@lists.freedesktop.org, chuansheng.liu@intel.com, fei.li@intel.com, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: Sync the hotplug work when device suspending 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 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is possible that during i915 device suspending with one pending hotplug work, one of cases is the device resume/suspend quickly. At this case, the hotplug work will be executed even after device is OFF, in Intel Android platform, it will cause system hang. Here we need sync the hotplug work in function i915_drm_freeze(). Signed-off-by: Liu, Chuansheng Signed-off-by: Li Fei --- drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 45b3c03..95c6956 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -562,6 +562,8 @@ static int i915_drm_freeze(struct drm_device *dev) drm_irq_uninstall(dev); dev_priv->enable_hotplug_processing = false; + cancel_work_sync(&dev_priv->hotplug_work); + /* * Disable CRTCs directly since we want to preserve sw state * for _thaw.