From patchwork Mon Apr 7 20:01:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 3946771 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5F873BFF02 for ; Mon, 7 Apr 2014 20:01:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 940A6201FE for ; Mon, 7 Apr 2014 20:01:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C341B201FD for ; Mon, 7 Apr 2014 20:01:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BC1D6E795; Mon, 7 Apr 2014 13:01:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by gabe.freedesktop.org (Postfix) with ESMTP id E04766E795 for ; Mon, 7 Apr 2014 13:01:54 -0700 (PDT) Received: by mail-pa0-f52.google.com with SMTP id rd3so7254341pab.39 for ; Mon, 07 Apr 2014 13:01:54 -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=YQyZ6zQStpOzIhtvukiLLnE+L6p1K6724Nj8YRvg5KQ=; b=i7oGcKmjQYv/FAOBrHgtq7ylyySsqB4s6M6JMoClKKsCdOdwETqTbRLRVmboHOGL+Y HAvRsaX6fizJ+nfCy0wP+hH0slu60PZ2Gi//bEQBGl3gJwbcdpVkwU5Seml7aVBz6c8f zh+qWGLV8e3QZRNbIbcBsjN3thpbz/9x7Bo92wK9+ngVFl6QJgjgeICF5P/mxCt2uihY C9TIgrnPM1SCgo1MGP6MiyZ9xjr8VJ9E/gQpOQDBK94ti6A1sTgMXDjJGGNFjcmwpv29 Bc6at53ozPPzzhT1wjJ+y5ABjyAorHlHE5yEaC7iOIodyn/WaquSbjIBwJkwBeVb2SLO pCBQ== X-Received: by 10.68.178.162 with SMTP id cz2mr32663673pbc.51.1396900914784; Mon, 07 Apr 2014 13:01:54 -0700 (PDT) Received: from localhost (jfdmzpr04-ext.jf.intel.com. [134.134.137.73]) by mx.google.com with ESMTPSA id ir10sm38626004pbc.59.2014.04.07.13.01.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Apr 2014 13:01:53 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Mon, 7 Apr 2014 17:01:46 -0300 Message-Id: <1396900911-12415-2-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1396900911-12415-1-git-send-email-rodrigo.vivi@gmail.com> References: <1396900911-12415-1-git-send-email-rodrigo.vivi@gmail.com> Cc: Deepak S Subject: [Intel-gfx] [PATCH 1/6] drm/i915: Bring UP Power Wells before disabling RC6. 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=-4.4 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: Deepak S We need do forcewake before Disabling RC6, This is what the BIOS expects while going into suspend. v2: updated commit message. (Daniel) Signed-off-by: Deepak S Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_pm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 04af065..ad2ff99 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3198,8 +3198,14 @@ static void valleyview_disable_rps(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; + /* we're doing forcewake before Disabling RC6, + * This what the BIOS expects when going into suspend */ + gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL); + I915_WRITE(GEN6_RC_CONTROL, 0); + gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL); + gen6_disable_rps_interrupts(dev); }