From patchwork Wed Jul 4 20:18:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1157291 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id B916F40ABE for ; Wed, 4 Jul 2012 20:21:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A66CB9E8EB for ; Wed, 4 Jul 2012 13:21:46 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E5159EB52 for ; Wed, 4 Jul 2012 13:18:56 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id b13so2863517wer.36 for ; Wed, 04 Jul 2012 13:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=j6ogF+9uRYNz0zQpIOozhLld6CsOMlk4AIvY2ftMnu0=; b=Wm6VAFi1Ou+QY1OQt9N08kJnuc7p/5TyhHLl5InWcRPQOrZuouTP4S8qVtnFfinlsU bMr/wk3AtJXuc5lcJpAXUiN+8QvJRgNZlU4yIhXMJ4Dvs2Q3PSpPLC1nulqzvh0h/3uB GTJ1Xe+mFXBtt4zZkW0ed/WF3vjVOXd0E9/TY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=j6ogF+9uRYNz0zQpIOozhLld6CsOMlk4AIvY2ftMnu0=; b=hl0KUd5I57KBvdz2mQDujJJYi0icZEO1eCZophAibM6NJPlA6I03z+Lc+GynXHHPzq ZWJRlFlQuMsrtC53Xe/nPZrtleZl2B0m09gV9U3s6+BOLZj5MqZMt4j8FIvaMh80ZGzQ JVqLxU5uN/BabMuieav1rIaU0SxDdxEagAULAz71rc2zAT1kS3W1NBLBfB9UYNow23cq gSZhBjyIpwBi5E6yPGM53Qfkm7483LsopZe6PtFzhBBKNTDphjDVbufZ7rlB6vLQKQoJ VljTQ3/myz0oMtVDYPjAORCKfVR/uKuaxz6esvth4yV2JzaOQgv3q6VOuAh/PXYvRbVK LPBQ== Received: by 10.216.150.213 with SMTP id z63mr7189890wej.102.1341433136792; Wed, 04 Jul 2012 13:18:56 -0700 (PDT) Received: from aaron.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id bg10sm69602224wib.9.2012.07.04.13.18.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jul 2012 13:18:56 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Wed, 4 Jul 2012 22:18:42 +0200 Message-Id: <1341433123-23055-5-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1341433123-23055-1-git-send-email-daniel.vetter@ffwll.ch> References: <1341433123-23055-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnA1DVnq8dP3q/ohUy8BW9vXDx8heLxuNgbv+5ck/JYBklrvVLewx7p/yWhCu0vHS/wjhaG Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 4/5] drm/i915: properly SIGBUS on I/O errors 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: , MIME-Version: 1.0 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 ... instead of looping endless with no hope of ever serving that page-fault. We only need to break out of this loop when the gpu died, to run the reset work (and hopefully resurrect it). This seems to have been lost in: commit d9bc7e9f32716901c617e1f0fb6ce0f74f172686 Author: Chris Wilson Date: Mon Feb 7 13:09:31 2011 +0000 drm/i915: Fix infinite loop regression from 21dd3734 Signed-Off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 7d28555..2b54142 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1141,6 +1141,11 @@ unlock: out: switch (ret) { case -EIO: + /* If this -EIO is due to a gpu hang, give the reset code a + * chance to clean up the mess. Otherwise return the proper + * SIGBUS. */ + if (!atomic_read(&dev_priv->mm.wedged)) + return VM_FAULT_SIGBUS; case -EAGAIN: /* Give the error handler a chance to run and move the * objects off the GPU active list. Next time we service the