All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/3] drm/i915/bxt, glk: Avoid long atomic poll during CDCLK change
Date: Tue, 30 Jan 2018 13:47:12 +0200	[thread overview]
Message-ID: <20180130114712.2644-3-imre.deak@intel.com> (raw)
In-Reply-To: <20180130114712.2644-1-imre.deak@intel.com>

There is no requirement for doing the PCODE request polling atomically,
so do that only for a short time switching to sleeping poll afterwards.
The specification requires a 150usec timeout for the change notification,
so let's use that for the atomic poll. Do the extra 2ms poll - needed as
a workaround on BXT/GLK - in sleeping mode.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/intel_cdclk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
index 8d06a6f66f29..f94e14c8cd0a 100644
--- a/drivers/gpu/drm/i915/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/intel_cdclk.c
@@ -1377,7 +1377,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
 	 */
 	mutex_lock(&dev_priv->pcu_lock);
 	ret = snb_pcode_request(dev_priv, HSW_PCODE_DE_WRITE_FREQ_REQ,
-				0x80000000, NULL, 2000, 0);
+				0x80000000, NULL, 150, 2);
 	mutex_unlock(&dev_priv->pcu_lock);
 
 	if (ret) {
@@ -1415,7 +1415,7 @@ static void bxt_set_cdclk(struct drm_i915_private *dev_priv,
 	 * the next PCODE request based on BSpec.
 	 */
 	ret = snb_pcode_request(dev_priv, HSW_PCODE_DE_WRITE_FREQ_REQ,
-				cdclk_state->voltage_level, NULL, 2000, 0);
+				cdclk_state->voltage_level, NULL, 150, 2);
 	mutex_unlock(&dev_priv->pcu_lock);
 
 	if (ret) {
-- 
2.13.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-01-30 11:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 11:47 [PATCH 1/3] drm/i915/bxt,glk: Increase PCODE timeouts during CDCLK freq changing Imre Deak
2018-01-30 11:47 ` [PATCH 2/3] drm/i915: Fold sandybridge_pcode_read() into snb_pcode_request() Imre Deak
2018-01-30 11:57   ` Chris Wilson
2018-01-30 12:25     ` Imre Deak
2018-01-30 12:50       ` Chris Wilson
2018-01-30 11:47 ` Imre Deak [this message]
2018-01-30 12:00 ` [PATCH 1/3] drm/i915/bxt, glk: Increase PCODE timeouts during CDCLK freq changing Chris Wilson
2018-01-30 13:42 ` [PATCH 1/3] drm/i915/bxt,glk: " Ville Syrjälä
2018-01-30 13:42   ` Ville Syrjälä
2018-01-30 14:17   ` Imre Deak
2018-01-30 14:17     ` [PATCH 1/3] drm/i915/bxt, glk: " Imre Deak
2018-01-30 17:06 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2018-01-30 19:57 ` ✓ Fi.CI.IGT: " Patchwork

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=20180130114712.2644-3-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.