From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: mika.kuoppala@intel.com
Subject: [PATCH 3/4] drm/i915: Remove posting-read for forcewake put
Date: Wed, 22 Mar 2017 00:39:46 +0000 [thread overview]
Message-ID: <20170322003947.6304-3-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20170322003947.6304-1-chris@chris-wilson.co.uk>
We can relax the requirement upon ourselves that the forcewake is
released immediately and just allow it to occur naturally following our
mmio request.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_drv.h | 1 -
drivers/gpu/drm/i915/intel_uncore.c | 33 +--------------------------------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3b63af6d5fe3..efa77733b501 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -783,7 +783,6 @@ struct intel_uncore {
u32 val_set;
u32 val_clear;
i915_reg_t reg_ack;
- i915_reg_t reg_post;
u32 val_reset;
} fw_domain[FW_DOMAIN_ID_COUNT];
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index ffd3e4aa0a73..4fa7c93977fc 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -105,15 +105,6 @@ fw_domain_put(struct drm_i915_private *i915,
__raw_i915_write32(i915, d->reg_set, d->val_clear);
}
-static inline void
-fw_domain_posting_read(struct drm_i915_private *i915,
- const struct intel_uncore_forcewake_domain *d)
-{
- /* something from same cacheline, but not from the set register */
- if (i915_mmio_reg_valid(d->reg_post))
- __raw_posting_read(i915, d->reg_post);
-}
-
static void
fw_domains_get(struct drm_i915_private *i915, enum forcewake_domains fw_domains)
{
@@ -137,28 +128,13 @@ fw_domains_put(struct drm_i915_private *i915, enum forcewake_domains fw_domains)
struct intel_uncore_forcewake_domain *d;
unsigned int tmp;
- for_each_fw_domain_masked(d, fw_domains, i915, tmp) {
+ for_each_fw_domain_masked(d, fw_domains, i915, tmp)
fw_domain_put(i915, d);
- fw_domain_posting_read(i915, d);
- }
i915->uncore.fw_domains_active &= ~fw_domains;
}
static void
-fw_domains_posting_read(struct drm_i915_private *i915)
-{
- struct intel_uncore_forcewake_domain *d;
- unsigned int tmp;
-
- /* No need to do for all, just do for first found */
- for_each_fw_domain(d, i915, tmp) {
- fw_domain_posting_read(i915, d);
- break;
- }
-}
-
-static void
fw_domains_reset(struct drm_i915_private *i915,
enum forcewake_domains fw_domains)
{
@@ -170,8 +146,6 @@ fw_domains_reset(struct drm_i915_private *i915,
for_each_fw_domain_masked(d, fw_domains, i915, tmp)
fw_domain_reset(i915, d);
-
- fw_domains_posting_read(i915);
}
static void __gen6_gt_wait_for_thread_c0(struct drm_i915_private *dev_priv)
@@ -1172,11 +1146,6 @@ static void fw_domain_init(struct drm_i915_private *dev_priv,
d->val_clear = _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL);
}
- if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
- d->reg_post = FORCEWAKE_ACK_VLV;
- else if (IS_GEN6(dev_priv) || IS_GEN7(dev_priv) || IS_GEN8(dev_priv))
- d->reg_post = ECOBUS;
-
d->id = domain_id;
BUILD_BUG_ON(FORCEWAKE_RENDER != (1 << FW_DOMAIN_ID_RENDER));
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-22 0:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-22 0:39 [PATCH 1/4] drm/i915: Eliminate per-fw_domain i915 backpointer Chris Wilson
2017-03-22 0:39 ` [PATCH 2/4] drm/i915: Skip unused fw_domains Chris Wilson
2017-03-22 0:39 ` Chris Wilson [this message]
2017-03-22 9:16 ` [PATCH 3/4] drm/i915: Remove posting-read for forcewake put Joonas Lahtinen
2017-03-22 0:39 ` [PATCH 4/4] drm/i915: All fw_domains share the same set/clear/reset values Chris Wilson
2017-03-22 9:14 ` Joonas Lahtinen
2017-03-22 1:08 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Eliminate per-fw_domain i915 backpointer Patchwork
2017-03-22 8:20 ` [PATCH 1/4] " Joonas Lahtinen
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=20170322003947.6304-3-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@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;
as well as URLs for NNTP newsgroup(s).