commit 05a2fb157e44a53c79133805d30eaada43911941 Author: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx> Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx