From patchwork Tue Nov 14 13:55:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10057691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D29906023A for ; Tue, 14 Nov 2017 13:55:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0786204FF for ; Tue, 14 Nov 2017 13:55:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5120296BA; Tue, 14 Nov 2017 13:55:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6DE7C204FF for ; Tue, 14 Nov 2017 13:55:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD2A16E03A; Tue, 14 Nov 2017 13:55:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A7E66E035; Tue, 14 Nov 2017 13:55:29 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id z3so22199273wme.5; Tue, 14 Nov 2017 05:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M+6MRnUqI7X+E0wkdPClwl5sVDVVmlocqN+gzxNLRDk=; b=XLlnouFOXfsMNkwy3zDPnNgF5C7dMmz9yi34ArrbuP4EGks8e9MA/hJxfw5u//0yJa TsN5wZwjLPTKCjMCiJDz4j7uq6SJ5mTpBI12l2cH0ITkxCGqUhpixNJ9QNSA1h54xI0i z28+AGLFY0Jq0ETIBA2FDA2VEsOyKYUPeyxI0hzLoMCjxXQKNrDd/1CKkgOYEFvMWZFG 27Som5bTxCcLBWOBt5nnrPZ6d5yMawBau21fJRt7lOYqPXENHosCY65dq/5wPjwMpDlB 4BeeNX7QhZl/+oYI7WoIX3asluCuWnKEYkjbeWqYA4wPtmgLORwrZSb5VWgFNlpEZ+SP hTqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M+6MRnUqI7X+E0wkdPClwl5sVDVVmlocqN+gzxNLRDk=; b=HOgYJ5/kqZVVQYt3bOcVFlayJcygDeCRvQ2uXywzVPzQBe2f19hOx7rHOhwu0eK8Sl APHm8kTcuIAX8QNzGdalSEvlTqNHJ3tbqiM0GiIuAZfUqWU9fbLUwwIH+iCJoChKHJLx Zn509tN90XMfFMzJuxt5lTLL1s1MXnMR1pD/52tYHnnMRighmm6e0RNORV+CAM6rK7Is kEDATy8i7aj7Ll4W7QGyrQfTWMmo2W3xrzBevCkX4f8aQFgI68gOK5qFnUdfWooPK/mz f0xX+0ssFndhnw/iMWU+kvFHc2Z6TvUIZKDKisAZv02uXYvludsbhTDJiQZpIg4StlJM qjvQ== X-Gm-Message-State: AJaThX7aNOrUcssjKXh2SVami155JkfMvnMJF3vrbeRnq0sE++pSPupR B6/678CBvluOPf1Ex2gI4G0= X-Google-Smtp-Source: AGs4zMZrSUPdODxQl3binYfjvvmgJMWQQHyQ8YL7RPkZjL2WB8zf+Gz84UxOMM5LFSAyN9Jc7axoEA== X-Received: by 10.28.160.14 with SMTP id j14mr1987047wme.125.1510667727738; Tue, 14 Nov 2017 05:55:27 -0800 (PST) Received: from shalem.localdomain.com (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id i1sm6756568wri.34.2017.11.14.05.55.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Nov 2017 05:55:26 -0800 (PST) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , Rodrigo Vivi , Mika Kuoppala , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Imre Deak Date: Tue, 14 Nov 2017 14:55:18 +0100 Message-Id: <20171114135518.15981-3-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171114135518.15981-1-hdegoede@redhat.com> References: <20171114135518.15981-1-hdegoede@redhat.com> MIME-Version: 1.0 Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Call uncore_suspend before platform suspend handlers 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Quoting Ville: "the forcewake timer might still be active until the uncore suspend, and having active forcewakes while we've already told the GT wake stuff to stop acting normally doesn't seem quite right to me." Reported-by: Ville Syrjälä Suggested-by: Imre Deak Reviewed-by: Imre Deak Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/i915_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index cdff9825a3da..2de174e0e82a 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -2532,6 +2532,8 @@ static int intel_runtime_suspend(struct device *kdev) intel_runtime_pm_disable_interrupts(dev_priv); + intel_uncore_suspend(dev_priv); + ret = 0; if (IS_GEN9_LP(dev_priv)) { bxt_display_core_uninit(dev_priv); @@ -2544,6 +2546,8 @@ static int intel_runtime_suspend(struct device *kdev) if (ret) { DRM_ERROR("Runtime suspend failed, disabling it (%d)\n", ret); + intel_uncore_runtime_resume(dev_priv); + intel_runtime_pm_enable_interrupts(dev_priv); enable_rpm_wakeref_asserts(dev_priv); @@ -2551,8 +2555,6 @@ static int intel_runtime_suspend(struct device *kdev) return ret; } - intel_uncore_suspend(dev_priv); - enable_rpm_wakeref_asserts(dev_priv); WARN_ON_ONCE(atomic_read(&dev_priv->runtime_pm.wakeref_count));