From patchwork Tue Nov 17 21:18:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 7642121 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5CAF99F2EC for ; Tue, 17 Nov 2015 21:18:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D0B62050E for ; Tue, 17 Nov 2015 21:18:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5E874204F6 for ; Tue, 17 Nov 2015 21:18:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE2A36E2A8; Tue, 17 Nov 2015 13:18:52 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id E209E6E2A8 for ; Tue, 17 Nov 2015 13:18:50 -0800 (PST) Received: by wmec201 with SMTP id c201so248888454wme.0 for ; Tue, 17 Nov 2015 13:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=FOT8/M3kOuobgLHHAiMpr7rrUeZ+d7mgRB23lJJzAbA=; b=YuDg4Adt7WZiK+INfjvVBAVvibWW0itJQY0gE1pJCdb8xbFsLxrlV8xrdN1n0wcPby giZ+AWFPgIQgZWWTLFg+eKYeHXxlbtuAIhkvZbfJpT4TEeDsgUYl6qKA6oEIpoqS3Rer ZBEccBNVEusdLXGZ2p7oEgpboZmxXP+ohaoxE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FOT8/M3kOuobgLHHAiMpr7rrUeZ+d7mgRB23lJJzAbA=; b=GOyWhyoiDUdso70IhBOvCSFcwY18opQwUWwApG5fvS+tjnNU8TWzoYnyERBGRDdfCn S8h2YAoPue47V7IKKFUPf6wtF02rS6oStGVrZwMAKoUH9Fj9QJncaf/kE9xZ4BEAwMMD eLJD+WxZo+C+rhYS1T1ZFW7hjj0HbV/lTu/fcMAASe3XygAVjBoMk99fVQN7cehLniJq oiGIGQuPOeXiaTFYRFB9MMvvCavdJCRxq/rW4P6FBPYr5rIXhlH9gO534RiCdEtBrZEB Ysu0gwWAChtDX9DG/JsPiVM+NfEKQ2RlbLsz0JLfHL+3+p98ZuZhvxjEoJzcTke2FDiH pvFw== X-Gm-Message-State: ALoCoQntYZhgkdQ4JWNaoew/0g0usBSZ0WObxZ8F7w173B66GzWUahgtlZ15Oz5Nxh2bMVZziy8p X-Received: by 10.194.201.202 with SMTP id kc10mr53226280wjc.84.1447795129132; Tue, 17 Nov 2015 13:18:49 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-109.fiber7.init7.net. [212.51.149.109]) by smtp.gmail.com with ESMTPSA id ej10sm40916290wjd.32.2015.11.17.13.18.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Nov 2015 13:18:47 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Tue, 17 Nov 2015 22:18:41 +0100 Message-Id: <1447795121-27332-1-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.5.1 Cc: Daniel Vetter , Daniel Vetter Subject: [Intel-gfx] [PATCH] drm/i915: Don't fail rpm suspend with -EGAIN X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 If we can't acquire dev->struct_mutex we need to fail runtime suspend, at least with the current design. Currently we do that using -EAGAIN, but that upsets the pm core, resulting in the occasional fail testcase in our CI with the following dmesg dirt: pci_pm_runtime_suspend(): intel_runtime_suspend+0x0/0x240 [i915] returns -11 Chris has some ideas to improve this, but for now just shut up the error. Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 5a70aca71d6b..ab8ffbc48e2d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1497,8 +1497,7 @@ static int intel_runtime_suspend(struct device *device) * We could deadlock here in case another thread holding struct_mutex * calls RPM suspend concurrently, since the RPM suspend will wait * first for this RPM suspend to finish. In this case the concurrent - * RPM resume will be followed by its RPM suspend counterpart. Still - * for consistency return -EAGAIN, which will reschedule this suspend. + * RPM resume will be followed by its RPM suspend counterpart. */ if (!mutex_trylock(&dev->struct_mutex)) { DRM_DEBUG_KMS("device lock contention, deffering suspend\n"); @@ -1508,7 +1507,8 @@ static int intel_runtime_suspend(struct device *device) */ pm_runtime_mark_last_busy(device); - return -EAGAIN; + /* Fail silently to avoid upsetting the pm core. */ + return 0; } /* * We are safe here against re-faults, since the fault handler takes