From patchwork Thu Mar 20 13:43:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 3866021 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 7D78C9F382 for ; Thu, 20 Mar 2014 13:43:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B554B20253 for ; Thu, 20 Mar 2014 13:43:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EEC1B20251 for ; Thu, 20 Mar 2014 13:43:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BCD76E089; Thu, 20 Mar 2014 06:43:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E11C6E089 for ; Thu, 20 Mar 2014 06:43:11 -0700 (PDT) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.73.22; Received: from nuc-i3427.alporthouse.com (unverified [78.156.73.22]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 22937291-1500048 for multiple; Thu, 20 Mar 2014 13:43:34 +0000 Received: by nuc-i3427.alporthouse.com (sSMTP sendmail emulation); Thu, 20 Mar 2014 13:43:07 +0000 Date: Thu, 20 Mar 2014 13:43:07 +0000 From: Chris Wilson To: Nikolay Martynov Subject: Re: Intel G41 doesn't see any screens connected after suspend/resume Message-ID: <20140320134307.GG4463@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Nikolay Martynov , Jani Nikula , dri-devel@lists.freedesktop.org References: <87mwgp8e39.fsf@intel.com> <87zjkozxk6.fsf@intel.com> <87k3brzz8p.fsf@intel.com> <20140320074639.GM4890@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 On Thu, Mar 20, 2014 at 09:38:17AM -0400, Nikolay Martynov wrote: > (gdb) list *i915_gem_object_set_cache_level+0x8a > 0x24e3a is in i915_gem_object_set_cache_level > (drivers/gpu/drm/i915/i915_gem.c:3147). > 3142 * crossing memory domains and dying. > 3143 */ > 3144 if (HAS_LLC(dev)) > 3145 return true; > 3146 > 3147 if (!drm_mm_node_allocated(gtt_space)) > 3148 return true; > 3149 > 3150 if (list_empty(>t_space->node_list)) > 3151 return true; > > Please let me know if there's anything else I can do. Can you please try: diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 13fc490d1f62..4f71125493fd 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3676,7 +3676,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, enum i915_cache_level cache_level) { struct drm_device *dev = obj->base.dev; - struct i915_vma *vma; + struct i915_vma *vma, *next; int ret; if (obj->cache_level == cache_level) @@ -3687,7 +3687,7 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, return -EBUSY; } - list_for_each_entry(vma, &obj->vma_list, vma_link) { + list_for_each_entry_safe(vma, next, &obj->vma_list, vma_link) { if (!i915_gem_valid_gtt_space(dev, &vma->node, cache_level)) { ret = i915_vma_unbind(vma); if (ret)