[Intel-gfx] [RFC 8/8] drm/i915: Simplify intel_has_sagv function.

Rodrigo Vivi rodrigo.vivi at intel.com
Thu Oct 18 23:34:47 UTC 2018


Let's just handle SKL as special case instead of listing
platform by platform.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 5663b7059467..97f191b081e0 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3612,15 +3612,11 @@ static bool skl_needs_memory_bw_wa(struct intel_atomic_state *state)
 static bool
 intel_has_sagv(struct drm_i915_private *dev_priv)
 {
-	if (INTEL_GEN(dev_priv) >= 10 ||
-	    IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv))
-		return true;
-
 	if (IS_SKYLAKE(dev_priv) &&
 	    dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED)
 		return true;
 
-	return false;
+	return IS_GEN9_BC(dev_priv) || INTEL_GEN(dev_priv) >= 10;
 }
 
 /*
-- 
2.19.1



More information about the Intel-gfx mailing list