drm/i915/cnl: Add force wake for gen10+.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 6 Jul 2017 01:00:31 +0000 (18:00 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 6 Jul 2017 20:22:37 +0000 (13:22 -0700)
By spec there is no change on force wake registers
for Cannonlake. Let's reuse gen9 one.

v2: Adding missing case for the write part. (Tvrtko)
v3: Rebase on recent tree.
v4: Make it for gen9+ instead adding gen10 only. (by Joonas).

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1499302831-17773-1-git-send-email-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/intel_uncore.c

index 1ed3dd8df850cffaa3b1c02144c5f17cd3180dca..deb4430541cf8316f7734a564495c130873735c2 100644 (file)
@@ -643,7 +643,7 @@ find_fw_domain(struct drm_i915_private *dev_priv, u32 offset)
        { .start = (s), .end = (e), .domains = (d) }
 
 #define HAS_FWTABLE(dev_priv) \
-       (IS_GEN9(dev_priv) || \
+       (INTEL_GEN(dev_priv) >= 9 || \
         IS_CHERRYVIEW(dev_priv) || \
         IS_VALLEYVIEW(dev_priv))
 
@@ -1072,7 +1072,7 @@ static void intel_uncore_fw_domains_init(struct drm_i915_private *dev_priv)
                dev_priv->uncore.fw_clear = _MASKED_BIT_DISABLE(FORCEWAKE_KERNEL);
        }
 
-       if (IS_GEN9(dev_priv)) {
+       if (INTEL_GEN(dev_priv) >= 9) {
                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,