From patchwork Thu Feb 27 22:26:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3736541 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 266279F2F7 for ; Thu, 27 Feb 2014 22:27:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 434F8201BB for ; Thu, 27 Feb 2014 22:27:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4C9242011E for ; Thu, 27 Feb 2014 22:27:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B98801058DB; Thu, 27 Feb 2014 14:27:43 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f178.google.com (mail-yk0-f178.google.com [209.85.160.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 8682C1058DB for ; Thu, 27 Feb 2014 14:27:31 -0800 (PST) Received: by mail-yk0-f178.google.com with SMTP id 79so8447107ykr.9 for ; Thu, 27 Feb 2014 14:27:31 -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=DgyvfcqPIzEtEcMfWSzvVLmZSGbWwOxHf4fmfyMg/zM=; b=UeDdgfOtV9P0RhkS+IYoVfLI83hO/vR0WGYokWeYMqV1Z99RQH6Lyl8QASi4Sc/Y84 ZsiGoBf6mfkMQQ8+EZ7llZVUvOenWnzLYiDGnmHxL7Epaxx4WRaGu1ZkBCnXF2VMrgM4 A7mAf+na+CncdhVV4YqzZ9ON2fTtWrcNlmW3zVzBYiZjVTCbpRkLMEiqfrzT2TCepmH0 xe1/Tq23oSTgarklJ2EQButITlZSruV+JC1CjyBZ/RqhiYxI0O3IX/ZeuY0LLldumMBQ Nm626FR/bM56uBkEtALiTHL34QpFGSoyJaE19fs0sC4ZJFWEwlp1/v0dNHa87ODnHSmB /V2w== X-Received: by 10.236.18.226 with SMTP id l62mr5008027yhl.105.1393540051234; Thu, 27 Feb 2014 14:27:31 -0800 (PST) Received: from localhost.localdomain ([177.132.50.39]) by mx.google.com with ESMTPSA id t58sm18099538yho.20.2014.02.27.14.27.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Feb 2014 14:27:30 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 27 Feb 2014 19:26:43 -0300 Message-Id: <1393540010-1582-17-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393540010-1582-1-git-send-email-przanoni@gmail.com> References: <1393540010-1582-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 16/23] drm/i915: get/put runtime PM references for GMBUS and DP AUX 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.1 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 had these intel_aux_display_runtime_{get,put} abstractions that would just get/put PC8 references, but now that runtime PM and PC8 are the same stuff, we just need the runtime PM references, so just get/put runtime PM directly, because that's what the rest of our code does. Another way to solve this problem would be to add DP_AUX and GMBUS power domains, and then use intel_display_power_{get,put}, but every power domain already gets/puts runtime PM references, so this would just make things more complex. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 4 ++-- drivers/gpu/drm/i915/intel_drv.h | 2 -- drivers/gpu/drm/i915/intel_i2c.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 11 ----------- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index c512d78..79d4844 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -469,7 +469,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, intel_dp_check_edp(intel_dp); - intel_aux_display_runtime_get(dev_priv); + intel_runtime_pm_get(dev_priv); /* Try to wait for any previous AUX channel activity */ for (try = 0; try < 3; try++) { @@ -563,7 +563,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, ret = recv_bytes; out: pm_qos_update_request(&dev_priv->pm_qos, PM_QOS_DEFAULT_VALUE); - intel_aux_display_runtime_put(dev_priv); + intel_runtime_pm_put(dev_priv); return ret; } diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index ea24eae..a2e0cd7 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -890,8 +890,6 @@ void ironlake_teardown_rc6(struct drm_device *dev); void gen6_update_ring_freq(struct drm_device *dev); void gen6_rps_idle(struct drm_i915_private *dev_priv); void gen6_rps_boost(struct drm_i915_private *dev_priv); -void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv); -void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv); void intel_runtime_pm_get(struct drm_i915_private *dev_priv); void intel_runtime_pm_put(struct drm_i915_private *dev_priv); void intel_init_runtime_pm(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index d33b61d..3d403ce 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -446,7 +446,7 @@ gmbus_xfer(struct i2c_adapter *adapter, int i, reg_offset; int ret = 0; - intel_aux_display_runtime_get(dev_priv); + intel_runtime_pm_get(dev_priv); mutex_lock(&dev_priv->gmbus_mutex); if (bus->force_bit) { @@ -546,7 +546,7 @@ timeout: out: mutex_unlock(&dev_priv->gmbus_mutex); - intel_aux_display_runtime_put(dev_priv); + intel_runtime_pm_put(dev_priv); return ret; } diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 86e6835..1e3580f 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5516,17 +5516,6 @@ void intel_power_domains_init_hw(struct drm_device *dev) I915_WRITE(HSW_PWR_WELL_BIOS, 0); } -/* Disables PC8 so we can use the GMBUS and DP AUX interrupts. */ -void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv) -{ - hsw_disable_package_c8(dev_priv); -} - -void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv) -{ - hsw_enable_package_c8(dev_priv); -} - void intel_runtime_pm_get(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev;