All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/3] drm/i915: Do only one posting read on forcewake put sequence
Date: Wed, 28 Jan 2015 14:43:25 +0200	[thread overview]
Message-ID: <1422449006-4028-2-git-send-email-mika.kuoppala@intel.com> (raw)
In-Reply-To: <1422449006-4028-1-git-send-email-mika.kuoppala@intel.com>

commit 05a2fb157e44a53c79133805d30eaada43911941
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Mon Jan 19 16:20:43 2015 +0200

    drm/i915: Consolidate forcewake code

introduced domain handling where each domain has it's own posting
read registers. This changed the forcewake sequence on 'put' side when
there is multiple domains as there would be extra read between the domain
puts. Any posting read should be enough to flush all the changes.

Do a posting read only once, at the end of the sequence and for
the first domain. Like it was before.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index be2c7fc..ebd9068 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -123,42 +123,42 @@ fw_domain_posting_read(const struct intel_uncore_forcewake_domain *d)
 }
 
 static void
-fw_domains_get(struct drm_i915_private *dev_priv, enum forcewake_domains fw_domains)
+fw_domains_posting_read(struct drm_i915_private *dev_priv)
 {
 	struct intel_uncore_forcewake_domain *d;
 	enum forcewake_domain_id id;
 
-	for_each_fw_domain_mask(d, fw_domains, dev_priv, id) {
-		fw_domain_wait_ack_clear(d);
-		fw_domain_get(d);
+	/* No need to do for all, just do for first found */
+	for_each_fw_domain(d, dev_priv, id) {
 		fw_domain_posting_read(d);
-		fw_domain_wait_ack(d);
+		break;
 	}
 }
 
 static void
-fw_domains_put(struct drm_i915_private *dev_priv, enum forcewake_domains fw_domains)
+fw_domains_get(struct drm_i915_private *dev_priv, enum forcewake_domains fw_domains)
 {
 	struct intel_uncore_forcewake_domain *d;
 	enum forcewake_domain_id id;
 
 	for_each_fw_domain_mask(d, fw_domains, dev_priv, id) {
-		fw_domain_put(d);
+		fw_domain_wait_ack_clear(d);
+		fw_domain_get(d);
 		fw_domain_posting_read(d);
+		fw_domain_wait_ack(d);
 	}
 }
 
 static void
-fw_domains_posting_read(struct drm_i915_private *dev_priv)
+fw_domains_put(struct drm_i915_private *dev_priv, enum forcewake_domains fw_domains)
 {
 	struct intel_uncore_forcewake_domain *d;
 	enum forcewake_domain_id id;
 
-	/* No need to do for all, just do for first found */
-	for_each_fw_domain(d, dev_priv, id) {
-		fw_domain_posting_read(d);
-		break;
-	}
+	for_each_fw_domain_mask(d, fw_domains, dev_priv, id)
+		fw_domain_put(d);
+
+	fw_domains_posting_read(dev_priv);
 }
 
 static void
-- 
1.9.1

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

  reply	other threads:[~2015-01-28 12:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 12:43 [PATCH 1/3] drm/i915: Do uncore early sanitize after domain init Mika Kuoppala
2015-01-28 12:43 ` Mika Kuoppala [this message]
2015-01-28 12:58   ` [PATCH 2/3] drm/i915: Do only one posting read on forcewake put sequence Chris Wilson
2015-01-28 13:25     ` [PATCH] drm/i915: Don't do posting reads on getting forcewake Mika Kuoppala
2015-01-28 14:04       ` Chris Wilson
2015-01-30 16:16         ` Daniel Vetter
2015-01-31  9:13       ` shuang.he
2015-01-28 13:28     ` [PATCH 2/3] drm/i915: Do only one posting read on forcewake put sequence Mika Kuoppala
2015-01-28 13:48       ` Ville Syrjälä
2015-01-28 15:54         ` Mika Kuoppala
2015-01-28 16:43           ` Chris Wilson
2015-01-28 12:43 ` [PATCH 3/3] drm/i915: Do only one posting read on forcewake get sequence Mika Kuoppala
2015-01-28 12:59   ` Chris Wilson
2015-01-31  7:52   ` shuang.he
2015-01-28 13:01 ` [PATCH 1/3] drm/i915: Do uncore early sanitize after domain init Chris Wilson

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=1422449006-4028-2-git-send-email-mika.kuoppala@intel.com \
    --to=mika.kuoppala@linux.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.