public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 12/19] drm/i915: get/put runtime PM references for GMBUS and DP AUX
Date: Thu, 19 Dec 2013 11:55:02 -0200	[thread overview]
Message-ID: <1387461309-2756-13-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <1387461309-2756-1-git-send-email-przanoni@gmail.com>

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

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 <paulo.r.zanoni@intel.com>
---
 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 7df5085..0895622 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -425,7 +425,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 	else
 		timeout = DP_AUX_CH_CTL_TIME_OUT_400us;
 
-	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++) {
@@ -523,7 +523,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 6985126..fc68c4a 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -862,8 +862,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 b1dc33f..ea3fb81 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -453,7 +453,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) {
@@ -553,7 +553,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 0786eda..57eda27 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5476,17 +5476,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;
-- 
1.8.3.1

  parent reply	other threads:[~2013-12-19 13:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 13:54 [PATCH 00/19] Make PC8 become part of runtime PM Paulo Zanoni
2013-12-19 13:54 ` [PATCH 01/19] drm/i915: rename modeset_update_power_wells Paulo Zanoni
2014-02-27 13:44   ` Imre Deak
2013-12-19 13:54 ` [PATCH 02/19] drm/i915: get/put runtime PM without holding rps.hw_lock Paulo Zanoni
2013-12-19 18:30   ` Jesse Barnes
2013-12-19 21:20     ` Daniel Vetter
2013-12-19 21:31       ` Paulo Zanoni
2014-02-27 13:45   ` Imre Deak
2013-12-19 13:54 ` [PATCH 03/19] drm/i915: add forcewake functions that don't touch runtime PM Paulo Zanoni
2014-02-27 14:43   ` Imre Deak
2014-02-27 14:48     ` Paulo Zanoni
2014-02-27 15:24       ` Imre Deak
2014-03-04 14:18       ` Daniel Vetter
2013-12-19 13:54 ` [PATCH 04/19] drm/i915: extract __hsw_do_{en, dis}able_package_c8 Paulo Zanoni
2014-02-27 14:49   ` Imre Deak
2013-12-19 13:54 ` [PATCH 05/19] drm/i915: make PC8 be part of runtime PM suspend/resume Paulo Zanoni
2013-12-19 13:54 ` [PATCH 06/19] drm/i915: get/put runtime PM when we get/put a power domain Paulo Zanoni
2014-01-24 19:58   ` Paulo Zanoni
2013-12-19 13:54 ` [PATCH 07/19] drm/i915: remove dev_priv->pc8.requirements_met Paulo Zanoni
2013-12-19 13:54 ` [PATCH 08/19] drm/i915: make gpu_idle be part of runtime PM, not PC8 Paulo Zanoni
2013-12-19 13:54 ` [PATCH 09/19] drm/i915: kill pc8.disable_count Paulo Zanoni
2013-12-19 13:55 ` [PATCH 10/19] drm/i915: remove an indirection level on PC8 functions Paulo Zanoni
2013-12-19 13:55 ` [PATCH 11/19] drm/i915: don't get/put PC8 reference on freeze/thaw Paulo Zanoni
2013-12-19 13:55 ` Paulo Zanoni [this message]
2013-12-19 13:55 ` [PATCH 13/19] drm/i915: don't get/put PC8 when getting/putting power wells Paulo Zanoni
2013-12-19 13:55 ` [PATCH 14/19] drm/i915: remove dev_priv->pc8.enabled Paulo Zanoni
2013-12-19 13:55 ` [PATCH 15/19] drm/i915: move pc8.irqs_disabled to pm.irqs_disabled Paulo Zanoni
2013-12-19 13:55 ` [PATCH 16/19] drm/i915: kill struct i915_package_c8 Paulo Zanoni
2013-12-19 13:55 ` [PATCH 17/19] drm/i915: rename __hsw_do_{en, dis}able_pc8 Paulo Zanoni
2013-12-19 13:55 ` [PATCH 18/19] drm/i915: update the PC8 and runtime PM documentation Paulo Zanoni
2013-12-19 13:55 ` [PATCH 19/19] drm/i915: init pm.suspended earlier Paulo Zanoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387461309-2756-13-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox