From patchwork Thu Oct 23 10:56:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5139391 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 359989F349 for ; Thu, 23 Oct 2014 10:57:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71EB52025A for ; Thu, 23 Oct 2014 10:57:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A261220222 for ; Thu, 23 Oct 2014 10:57:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D75E8970E; Thu, 23 Oct 2014 03:57:27 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f178.google.com (mail-qc0-f178.google.com [209.85.216.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 6728B8970E for ; Thu, 23 Oct 2014 03:57:26 -0700 (PDT) Received: by mail-qc0-f178.google.com with SMTP id b13so540115qcw.37 for ; Thu, 23 Oct 2014 03:57:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A2FDBLefdvgwicQhfdWrVqgh5joiYJnYavZaVU3Lx9k=; b=SB+gvOc+i2qmm7frla+PTk8iM8AHV6q2SJaTyLgFoo7uvHyljhVhBi6u3LYbVzZmSh uJ5pXgJ64lKEV3/8nuw1blj1f+w74pXNze59mEazJGHMkmu5iLi+R/TnvQczCyJ1F23L D+a7J+Ppo5t/HKDKmmFeEADV+GV3W3JW3/qx2s1kPKL0uOzco64BwyDRTrkNPTc06fZo 75LFd31iVdclwAVgZvIOpwszYdqSB1Q5go4GbRFQRhNk2/556LC+kJaTV9/VEzKjIXp8 NCSSzccpzzzli5MD5l01VTvgnE4xMHvuJt/9qZY+VCOVIeQcQHKPCo2OrqSAcuLooKqc FqrQ== X-Received: by 10.224.45.65 with SMTP id d1mr6208088qaf.43.1414061845971; Thu, 23 Oct 2014 03:57:25 -0700 (PDT) Received: from localhost.localdomain ([177.40.104.237]) by mx.google.com with ESMTPSA id r12sm1274960qax.35.2014.10.23.03.57.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Oct 2014 03:57:25 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Oct 2014 08:56:44 -0200 Message-Id: <1414061804-2594-2-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414061804-2594-1-git-send-email-przanoni@gmail.com> References: <1414061804-2594-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/2] drm/i915: run hsw_disable_pc8() later on resume X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 From: Paulo Zanoni We want to run intel_uncore_early_sanitize() before we touch any registers, because on BDW, when we resume, the FPGA_DBG_RM_NOCLAIM bit is set, so we need to clear it - through intel_uncore_early_sanitize() - before we do anything else. With the current code, we don't clear the bit before our first register access, so we print a WARN complaining about an unclaimed register error. v1: Was called "drm/i915: run intel_uncore_early_sanitize earlier on resume" v2: Was called "drm/i915: run intel_uncore_early_sanitize earlier on resume on non-VLV" v3: This one, on top of the intel_resume_prepare() rework. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83094 Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_drv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index c5b2662..ea7415a 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -665,15 +665,16 @@ static int i915_drm_thaw_early(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; int ret = 0; - if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) - hsw_disable_pc8(dev_priv); - else if (IS_VALLEYVIEW(dev_priv)) + if (IS_VALLEYVIEW(dev_priv)) ret = vlv_resume_prepare(dev_priv, false); if (ret) DRM_ERROR("Resume prepare failed: %d,Continuing resume\n", ret); - intel_uncore_early_sanitize(dev, true); + + if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) + hsw_disable_pc8(dev_priv); + intel_uncore_sanitize(dev); intel_power_domains_init_hw(dev_priv);