Commit 74ef1173 authored by Akash Goel's avatar Akash Goel Committed by Daniel Vetter

drm/i915/skl: Updated the gen6_rps_limits function

RP Interrupt Up/Down Frequency Limits register (A014) definition
has changed for SKL. Updated the gen6_rps_limits function as per that

v2: Renamed the function to intel_rps_limits (Chris)
Signed-off-by: default avatarAkash Goel <akash.goel@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 8a586437
...@@ -3806,7 +3806,7 @@ static void ironlake_disable_drps(struct drm_device *dev) ...@@ -3806,7 +3806,7 @@ static void ironlake_disable_drps(struct drm_device *dev)
* ourselves, instead of doing a rmw cycle (which might result in us clearing * ourselves, instead of doing a rmw cycle (which might result in us clearing
* all limits and the gpu stuck at whatever frequency it is at atm). * all limits and the gpu stuck at whatever frequency it is at atm).
*/ */
static u32 gen6_rps_limits(struct drm_i915_private *dev_priv, u8 val) static u32 intel_rps_limits(struct drm_i915_private *dev_priv, u8 val)
{ {
u32 limits; u32 limits;
...@@ -3816,9 +3816,15 @@ static u32 gen6_rps_limits(struct drm_i915_private *dev_priv, u8 val) ...@@ -3816,9 +3816,15 @@ static u32 gen6_rps_limits(struct drm_i915_private *dev_priv, u8 val)
* the hw runs at the minimal clock before selecting the desired * the hw runs at the minimal clock before selecting the desired
* frequency, if the down threshold expires in that window we will not * frequency, if the down threshold expires in that window we will not
* receive a down interrupt. */ * receive a down interrupt. */
limits = dev_priv->rps.max_freq_softlimit << 24; if (IS_GEN9(dev_priv->dev)) {
if (val <= dev_priv->rps.min_freq_softlimit) limits = (dev_priv->rps.max_freq_softlimit) << 23;
limits |= dev_priv->rps.min_freq_softlimit << 16; if (val <= dev_priv->rps.min_freq_softlimit)
limits |= (dev_priv->rps.min_freq_softlimit) << 14;
} else {
limits = dev_priv->rps.max_freq_softlimit << 24;
if (val <= dev_priv->rps.min_freq_softlimit)
limits |= dev_priv->rps.min_freq_softlimit << 16;
}
return limits; return limits;
} }
...@@ -3959,7 +3965,7 @@ static void gen6_set_rps(struct drm_device *dev, u8 val) ...@@ -3959,7 +3965,7 @@ static void gen6_set_rps(struct drm_device *dev, u8 val)
/* Make sure we continue to get interrupts /* Make sure we continue to get interrupts
* until we hit the minimum or maximum frequencies. * until we hit the minimum or maximum frequencies.
*/ */
I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, gen6_rps_limits(dev_priv, val)); I915_WRITE(GEN6_RP_INTERRUPT_LIMITS, intel_rps_limits(dev_priv, val));
I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val)); I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
POSTING_READ(GEN6_RPNSWREQ); POSTING_READ(GEN6_RPNSWREQ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment