From patchwork Mon Jun 9 18:57:29 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: 4323141 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 1EFA3BEEAA for ; Mon, 9 Jun 2014 18:56:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AA6F20295 for ; Mon, 9 Jun 2014 18:56:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 816B920274 for ; Mon, 9 Jun 2014 18:56:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 196C46E5D7; Mon, 9 Jun 2014 11:56:38 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F4F46E5D7 for ; Mon, 9 Jun 2014 11:56:32 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 09 Jun 2014 11:51:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.98,1003,1392192000"; d="scan'208"; a="525775639" Received: from sagar-desktop.iind.intel.com ([10.223.82.74]) by orsmga001.jf.intel.com with ESMTP; 09 Jun 2014 11:56:30 -0700 From: sagar.a.kamble@intel.com To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Jun 2014 00:27:29 +0530 Message-Id: <1402340250-3909-2-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.8.5 In-Reply-To: <1402340250-3909-1-git-send-email-sagar.a.kamble@intel.com> References: <1402340250-3909-1-git-send-email-sagar.a.kamble@intel.com> Cc: Daniel Vetter , sagar.a.kamble@intel.com, shashidhar.hiremath@intel.com Subject: [Intel-gfx] [PATCH 1/2] drm/i915: do runtime_get/put during display well power gate/ungate 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Display power island is on during boot, we have one count for it once this power gates, we do a put making sure runtime_suspend is called Cc: Daniel Vetter (supporter:INTEL DRM DRIVERS...) Cc: Jani Nikula (supporter:INTEL DRM DRIVERS...) Signed-off-by: Sagar Kamble --- 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 f83d1ff..b333aae 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -6017,6 +6017,12 @@ void __vlv_set_power_well(struct drm_i915_private *dev_priv, state, vlv_punit_read(dev_priv, PUNIT_REG_PWRGT_CTRL)); + if (PUNIT_POWER_WELL_DISP2D == power_well_id) { + if (enable) + intel_runtime_pm_get(dev_priv); + else + intel_runtime_pm_put(dev_priv); + } #undef COND out: