From patchwork Sat Apr 2 02:21:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 682951 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p322LHX3031911 for ; Sat, 2 Apr 2011 02:21:42 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DEEC09E921 for ; Fri, 1 Apr 2011 19:21:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8]) by gabe.freedesktop.org (Postfix) with SMTP id 1BA9E9E70A for ; Fri, 1 Apr 2011 19:21:09 -0700 (PDT) Received: (qmail 15053 invoked by uid 0); 2 Apr 2011 02:21:08 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy3.bluehost.com with SMTP; 2 Apr 2011 02:21:08 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=Fw+Gh6uxvbhm+m5mapmYVzKwerKGhnxOnHfJzLPTuwQrqdlqw6oFFUOHCqe/ouThQ+ic8yW13RsTDolmYiNre1irk529bXXmnIlFzwU7Z/Ccx8mDl5iucfwtGA+5/38s; Received: from c-67-161-37-189.hsd1.ca.comcast.net ([67.161.37.189] helo=jbarnes-x200) by box514.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1Q5qSa-0004Gj-5h; Fri, 01 Apr 2011 20:21:08 -0600 Date: Fri, 1 Apr 2011 19:21:06 -0700 From: Jesse Barnes To: Norbert Preining Subject: Re: Lenovo resume from suspends hangs in i915_gpu_busy or so Message-ID: <20110401192106.2cca8cd7@jbarnes-x200> In-Reply-To: <20110402002410.GL6464@gamma.logic.tuwien.ac.at> References: <20110401021055.GB6071@gamma.logic.tuwien.ac.at> <20110401051511.GE9128@gamma.logic.tuwien.ac.at> <20110401090817.01717af0@jbarnes-desktop> <20110402002410.GL6464@gamma.logic.tuwien.ac.at> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 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-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 02 Apr 2011 02:21:42 +0000 (UTC) On Sat, 2 Apr 2011 09:24:10 +0900 Norbert Preining wrote: > > Hm, ok so on resume we're checking GPU busyness, which is normal, > > but end up hanging on the spinlock? Do you see what scrolls by > > above the text you took a picture of (probably a "task hung" > > message?). > > More than what I can see on the screen shot I cannot grasp. > > > Does this happen reliably? Does a previous kernel work ok? > > Reliable: yes > Previous: I don't know, but I can try out some older git release. > which one do you suggest? > (I got the laptop recently so I don't have a long history with that > one) Well I'd start with something like 2.6.37, I think that's the first release that had IPS. At least it's good that you can reproduce it easily... Can you add something like this to your kernel to see why the gpu_busy call might be hanging? I'm guessing we hang trying to take the spinlock; if so enabling lockdep debugging might tell us who else took it. Thanks, Jesse diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8cb7f93..47fb29a 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1790,14 +1790,18 @@ bool i915_gpu_busy(void) struct drm_i915_private *dev_priv; bool ret = false; + DRM_ERROR("entering busy check, trying to take lock\n"); + spin_lock(&mchdev_lock); if (!i915_mch_dev) goto out_unlock; + DRM_ERROR("got lock, returning current busy status\n"); dev_priv = i915_mch_dev; ret = dev_priv->busy; out_unlock: + DRM_ERROR("unlock & return\n"); spin_unlock(&mchdev_lock); return ret;