[Intel-gfx] [PATCH] drm/i915: Respect ring_mask when initializing forcewake domains

Wang Elaine elaine.wang at intel.com
Mon Dec 5 13:16:00 UTC 2016


From: Elaine Wang <elaine.wang at intel.com>

Some platforms don't have render or blitter. So no need to call
render domain or blitter domain forcewake init function.

Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Elaine Wang <elaine.wang at intel.com>
---
 drivers/gpu/drm/i915/intel_uncore.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 07779d0..6ab3b43 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -1288,14 +1288,20 @@ static void intel_uncore_fw_domains_init(struct drm_i915_private *dev_priv)
 	if (IS_GEN9(dev_priv)) {
 		dev_priv->uncore.funcs.force_wake_get = fw_domains_get;
 		dev_priv->uncore.funcs.force_wake_put = fw_domains_put;
-		fw_domain_init(dev_priv, FW_DOMAIN_ID_RENDER,
-			       FORCEWAKE_RENDER_GEN9,
-			       FORCEWAKE_ACK_RENDER_GEN9);
-		fw_domain_init(dev_priv, FW_DOMAIN_ID_BLITTER,
-			       FORCEWAKE_BLITTER_GEN9,
-			       FORCEWAKE_ACK_BLITTER_GEN9);
-		fw_domain_init(dev_priv, FW_DOMAIN_ID_MEDIA,
-			       FORCEWAKE_MEDIA_GEN9, FORCEWAKE_ACK_MEDIA_GEN9);
+		if (HAS_ENGINE(dev_priv, RCS))
+			fw_domain_init(dev_priv, FW_DOMAIN_ID_RENDER,
+				       FORCEWAKE_RENDER_GEN9,
+				       FORCEWAKE_ACK_RENDER_GEN9);
+
+		if (HAS_ENGINE(dev_priv, BCS))
+			fw_domain_init(dev_priv, FW_DOMAIN_ID_BLITTER,
+				       FORCEWAKE_BLITTER_GEN9,
+				       FORCEWAKE_ACK_BLITTER_GEN9);
+
+		if (HAS_ENGINE(dev_priv, VCS))
+			fw_domain_init(dev_priv, FW_DOMAIN_ID_MEDIA,
+				       FORCEWAKE_MEDIA_GEN9,
+				       FORCEWAKE_ACK_MEDIA_GEN9);
 	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
 		dev_priv->uncore.funcs.force_wake_get = fw_domains_get;
 		if (!IS_CHERRYVIEW(dev_priv))
-- 
1.9.1



More information about the Intel-gfx mailing list