Skip to content

Commit 1ca2b06

Browse files
committed
drm/i915: Simplify has_sagv function
The specially case for SKL for not controlled sagv is already taken care inside intel_enable_sagv, so there's no need to duplicate the check here. v2: Go one step further and remove skl special case. (Jani) v3: Separate runtime status handle from has_sagv flag. v4: Go back and accept simple Jani proposed solution. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181026200317.21726-1-rodrigo.vivi@intel.com
1 parent c5def85 commit 1ca2b06

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,15 +3611,8 @@ static bool skl_needs_memory_bw_wa(struct intel_atomic_state *state)
36113611
static bool
36123612
intel_has_sagv(struct drm_i915_private *dev_priv)
36133613
{
3614-
if (IS_KABYLAKE(dev_priv) || IS_COFFEELAKE(dev_priv) ||
3615-
IS_CANNONLAKE(dev_priv) || IS_ICELAKE(dev_priv))
3616-
return true;
3617-
3618-
if (IS_SKYLAKE(dev_priv) &&
3619-
dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED)
3620-
return true;
3621-
3622-
return false;
3614+
return (IS_GEN9_BC(dev_priv) || INTEL_GEN(dev_priv) >= 10) &&
3615+
dev_priv->sagv_status != I915_SAGV_NOT_CONTROLLED;
36233616
}
36243617

36253618
/*

0 commit comments

Comments
 (0)