[Intel-gfx] [PATCH 3/3] drm/i915: Do not serialize forcewake acquire across domains

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Apr 4 16:51:11 UTC 2016


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

On platforms with multiple forcewake domains it seems more efficient
to request all desired ones and then to wait for acks to avoid
needlessly serializing on each domain.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 49edd641b434..03674c3cfaf7 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -115,8 +115,10 @@ fw_domains_get(struct drm_i915_private *dev_priv, enum forcewake_domains fw_doma
 	for_each_fw_domain_mask(d, fw_domains, dev_priv) {
 		fw_domain_wait_ack_clear(d);
 		fw_domain_get(d);
-		fw_domain_wait_ack(d);
 	}
+
+	for_each_fw_domain_mask(d, fw_domains, dev_priv)
+		fw_domain_wait_ack(d);
 }
 
 static void
-- 
1.9.1



More information about the Intel-gfx mailing list