From patchwork Thu Dec 19 13:54:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3381091 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 19CEDC0D4B for ; Thu, 19 Dec 2013 13:55:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8114F20688 for ; Thu, 19 Dec 2013 13:55:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B33582068A for ; Thu, 19 Dec 2013 13:55:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EFBE437B4; Thu, 19 Dec 2013 05:55:40 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f52.google.com (mail-qa0-f52.google.com [209.85.216.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 09DFA437A8 for ; Thu, 19 Dec 2013 05:55:35 -0800 (PST) Received: by mail-qa0-f52.google.com with SMTP id cm18so1489609qab.4 for ; Thu, 19 Dec 2013 05:55:35 -0800 (PST) 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=ok1dnzPFBbPbJrlfdkJ6mkbh6RZnknbmP9p/2GyMEjs=; b=LOipXi8PSyrJaQA1tuKW443J4m1sxT3ctY8qZdavuSeTo0yRYRBf/YL6jGOTQNJH3N r5OLpMojugXcQVuoA1ZhtrowIxVKWfqBRJ5KVaKoB+8lgpXTjgYtmyeBb+J/O0XiZk0Y wlrn+9TLm9EwhqzWnzUYbvHLnoM7gdEBQt7hkPqlxEChVlWqy3i2ozqkSsJTtFkQ3h1H RF4tug7Yh7+M063PsR9JrCH0sM6auT1N3+spYVyefAAgjwhLif6Dq2DEM2cKtylW30oX rO5Ch1xNBMPSqwNRoUuCT56TdnPEeGcvB7++veUR2Acm6mDT9yZxfns5WONEnz0e4thU /btQ== X-Received: by 10.229.179.69 with SMTP id bp5mr3066062qcb.17.1387461335728; Thu, 19 Dec 2013 05:55:35 -0800 (PST) Received: from localhost.localdomain ([177.40.41.2]) by mx.google.com with ESMTPSA id e2sm633990qas.21.2013.12.19.05.55.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2013 05:55:35 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 19 Dec 2013 11:54:56 -0200 Message-Id: <1387461309-2756-7-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1387461309-2756-1-git-send-email-przanoni@gmail.com> References: <1387461309-2756-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 06/19] drm/i915: get/put runtime PM when we get/put a power domain X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 Any power domain will require the HW to be in PCI D0 state, so just do the simple thing. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index c644a6f..273e806 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5301,6 +5301,8 @@ void intel_display_power_get(struct drm_device *dev, struct i915_power_well *power_well; int i; + intel_runtime_pm_get(dev_priv); + power_domains = &dev_priv->power_domains; mutex_lock(&power_domains->lock); @@ -5332,6 +5334,8 @@ void intel_display_power_put(struct drm_device *dev, __intel_power_well_put(dev, power_well); mutex_unlock(&power_domains->lock); + + intel_runtime_pm_put(dev_priv); } static struct i915_power_domains *hsw_pwr;