From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 3/5] drm/i915: Suppress EIO during i915_gem_idle() Date: Wed, 18 Apr 2012 10:51:29 +0200 Message-ID: <20120418085129.GE5315@phenom.ffwll.local> References: <1334393751-8921-1-git-send-email-chris@chris-wilson.co.uk> <1334393751-8921-3-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ey0-f177.google.com (mail-ey0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 435469ED43 for ; Wed, 18 Apr 2012 01:50:32 -0700 (PDT) Received: by eaak13 with SMTP id k13so1824314eaa.36 for ; Wed, 18 Apr 2012 01:50:31 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1334393751-8921-3-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, Apr 14, 2012 at 09:55:49AM +0100, Chris Wilson wrote: > i915_gem_idle() is called when we need to suspend the GPU. If the GPU is > already suspended by this point due to being wedged, we can safely > continue. > > Signed-off-by: Chris Wilson Imo the right way to fix this case here is by checking this in gpu_idle and just not bothering to emit any flushes and request if the gpu is wedged already. -Daniel > --- > drivers/gpu/drm/i915/i915_gem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index ffe0853..a6819c1 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -3576,7 +3576,7 @@ i915_gem_idle(struct drm_device *dev) > } > > ret = i915_gpu_idle(dev, true); > - if (ret) { > + if (ret && ret != -EIO) { > mutex_unlock(&dev->struct_mutex); > return ret; > } > -- > 1.7.10 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48