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: 2834817 Return-Path: X-Original-To: patchwork-dri-devel@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 0E9A29F9BE for ; Mon, 29 Jul 2013 06:33:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69D9B201E1 for ; Mon, 29 Jul 2013 06:33:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 68032201E0 for ; Mon, 29 Jul 2013 06:33:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FD0AE6782 for ; Sun, 28 Jul 2013 23:33:26 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@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 Subject: [PATCH] drm/i915: Sync the hotplug work when device suspending 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 X-Mailman-Approved-At: Sun, 28 Jul 2013 22:44:06 -0700 Cc: intel-gfx@lists.freedesktop.org, chuansheng.liu@intel.com, fei.li@intel.com, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-3.8 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.