From patchwork Mon Dec 1 06:58:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sagar.a.kamble@intel.com X-Patchwork-Id: 5410201 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 8BB469F30B for ; Mon, 1 Dec 2014 06:57:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C6B6D2010B for ; Mon, 1 Dec 2014 06:57:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D32002027D for ; Mon, 1 Dec 2014 06:57:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 505B86E100; Sun, 30 Nov 2014 22:57:21 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTP id 9450C6E100 for ; Sun, 30 Nov 2014 22:57:19 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 30 Nov 2014 22:54:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,491,1413270000"; d="scan'208";a="646033091" Received: from sagar-desktop.iind.intel.com ([10.223.82.56]) by orsmga002.jf.intel.com with ESMTP; 30 Nov 2014 22:57:17 -0800 From: sagar.a.kamble@intel.com To: intel-gfx@lists.freedesktop.org Date: Mon, 1 Dec 2014 12:28:05 +0530 Message-Id: <1417417085-32419-2-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1417417085-32419-1-git-send-email-sagar.a.kamble@intel.com> References: <1417417085-32419-1-git-send-email-sagar.a.kamble@intel.com> Cc: Akash Goel , Sagar Kamble Subject: [Intel-gfx] [PATCH v1 2/2] drm/i915: Deferring uncore early sanitize, sanitize, disable pc8 to resume 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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: Sagar Kamble Due to disabling of RC6 in uncore_sanitize in early resume, power is drained till it RC6 is re-enabled post resume. With this change RC6 disabling will be done at beginning of resume only. This helps yield additional power benefits. Signed-off-by: Akash Goel Signed-off-by: Sagar Kamble --- drivers/gpu/drm/i915/i915_drv.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 71be3c9..0e08ec0 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -675,6 +675,13 @@ static int i915_drm_resume(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; + intel_uncore_early_sanitize(dev, true); + + if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) + hsw_disable_pc8(dev_priv); + + intel_uncore_sanitize(dev); + if (drm_core_check_feature(dev, DRIVER_MODESET)) { mutex_lock(&dev->struct_mutex); i915_gem_restore_gtt_mappings(dev); @@ -761,12 +768,6 @@ static int i915_drm_resume_early(struct drm_device *dev) 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); return ret;