From patchwork Thu Oct 19 08:34:44 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: 10016185 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 CAB06600CC for ; Thu, 19 Oct 2017 08:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA58328B37 for ; Thu, 19 Oct 2017 08:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEC7928BC5; Thu, 19 Oct 2017 08:34:58 +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 6F00A28B37 for ; Thu, 19 Oct 2017 08:34:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26BAE6EA19; Thu, 19 Oct 2017 08:34:57 +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 1D4166E9EA; Thu, 19 Oct 2017 08:34:54 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id q124so14402681wmb.0; Thu, 19 Oct 2017 01:34:54 -0700 (PDT) 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=WG5KtB6KDwlY9MDJUloScxIVlvEnGOXMzKQDTpmDcO8=; b=R1MQXgm6yP/i7cmw4irdYiPvALf+aGviLTMhsUilVVy/416olsp74VERXlgMjaU/pF pukqKFuWNiJh+aHfMfUlMPgP3euu8I2kOtkCAbruEgDbG6CInicj6IPHF6apwYtILIHB REEkQPahFqUWQCTXlPRBt5iwkdPfJosIyawe6GyQp8pvjcaamhskE0RQqmostBmJZJOw tIu/JJg88gdRU/H9M7CcFVKXuj8qi77SdXW5SsPFHlse3ctphpmyB0U4IZ83P7fn36Ev UFQNp/Cm9hSgVrZV8LMT9EBx+CmqE2QVm+4EP+63b6CYKyYSZ9Jc2xypG/Fty2tiiknn pkQg== 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=WG5KtB6KDwlY9MDJUloScxIVlvEnGOXMzKQDTpmDcO8=; b=lL8AtNcnLFXztjvSuTtiq/Kx7geaOP/PFyCcirU8k/ub6xd53CFe6qWFtQMKn3YxE8 Ax5dDos5YWC2YPqE/mHQepqHEwfNWzKk/ctDRuv90pVso8rMdxbWsFjDzmMsORhvW7/X 3RocaUGUOfaShuB5kHoYHDwsavJuk1bMZ0YloQ53147nY/2NFXPNdwBrk3M3VfT+t0uy 80uiOmxjb41R0Dok6cekT2kH1ojHI5fRq8Of0Yg+j6MvGJ3e3CGMAL9j3p/d+6fJ6V+n EtQx838+WBB8/mew7wt2JvOzGcoVyW+prDq8j2bPSh1bo+bWOTSo/1JB05b3eIMfCXD1 oTEg== X-Gm-Message-State: AMCzsaXRjLobUWgtRuy67cPZ8OUnJTgcNQG+JdPM5chepDtfDp7I+OXo Rf65eElJOWE3cgBxrclEoc7DU+x9 X-Google-Smtp-Source: ABhQp+Qg7hH8Z+6FB03QP3J60Wv4NpNwow1g46+YW3c0WfiNmT7jEe4N+LyanVIif+u+CMGMpBoHJQ== X-Received: by 10.28.35.67 with SMTP id j64mr821543wmj.55.1508402093605; Thu, 19 Oct 2017 01:34:53 -0700 (PDT) Received: from shalem.localdomain.com (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id h8sm1074864wme.30.2017.10.19.01.34.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 01:34:52 -0700 (PDT) From: Hans de Goede X-Google-Original-From: Hans de Goede To: Daniel Vetter , Jani Nikula , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Imre Deak Date: Thu, 19 Oct 2017 10:34:44 +0200 Message-Id: <20171019083444.8425-4-hdegoede@redhat.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171019083444.8425-1-hdegoede@redhat.com> References: <20171019083444.8425-1-hdegoede@redhat.com> MIME-Version: 1.0 Cc: Hans de Goede , intel-gfx , dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH resend v3 3/3] 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 Signed-off-by: Hans de Goede Reviewed-by: Imre Deak --- Changes in v2: -Rebase on current (July 6th 2017) drm-next Changes in v3: -Add Imre's Reviewed-by --- 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 34191028bbad..0871eb801bde 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -2523,6 +2523,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); @@ -2535,6 +2537,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); @@ -2542,8 +2546,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));