drm/i915: Fix the graphics frequency clamping at init and when IPS is active.
Subsystems (2)
PATCH 1/1 drm/i915: Fix the graphics frequency clamping at init and when IPS is active.
From: Jesse Barnes <[email protected]>
Part of the issue here was that Eric slipped in a debug hack for testing the i915 IPS code before the intel_ips.c driver had landed. This caused the driver to always use the full range of frequencies, which is only legal when IPS tells us we have the headroom. Once that hack was removed, there was confusion about the driver's frequency clamping variables: max_delay is the driver's current limit on the highest frequency the IPS driver wants us to use, while dev_priv->fmax is the hardware-reported limit that the IPS driver can increase up to.
Tested with IPS driver loaded or not. Note that on Ironlake systems without the IPS driver loaded this will result in a performance reduction, and the inital warmup of frequency limits can impact benchmarking on systems with IPS loaded.
--- drivers/gpu/drm/i915/intel_display.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -4
@@ -5581,19 +5581,18 @@ void ironlake_enable_drps(struct drm_device *dev) fmin = (rgvmodectl &MEMMODE_FMIN_MASK ); fstart = (rgvmodectl &MEMMODE_FSTART_MASK ) >>MEMMODE_FSTART_SHIFT ; - fstart = fmax; vstart = (I915_READ (PXVFREQ_BASE + (fstart *4 )) &PXVFREQ_PX_MASK ) >>PXVFREQ_PX_SHIFT ; - dev_priv->fmax = fstart;/* IPS callback will increase this */ + dev_priv->fmax = fmax;/* IPS callback will increase this */ dev_priv->fstart = fstart; - dev_priv->max_delay = fmax; + dev_priv->max_delay = fstart; dev_priv->min_delay = fmin; dev_priv->cur_delay = fstart; -DRM_DEBUG_DRIVER ("fmax: %d, fmin: %d, fstart: %d\n" , fmax, fmin, +DRM_ERROR ("fmax: %d, fmin: %d, fstart: %d\n" , fmax, fmin, fstart);I915_WRITE (MEMINTREN ,MEMINT_CX_SUPR_EN |MEMINT_EVAL_CHG_EN );
Signature · 1 line
1.7.2.3
drivers/gpu/drm/i915/intel_display.c void ironlake_enable_drps(struct drm_device *dev) · line 5596
Quoted 4 lines · Eric Anholt
From: Jesse Barnes <[email protected]>
drivers/gpu/drm/i915/intel_display.c +1
-1-DRM_DEBUG_DRIVER ("fmax: %d, fmin: %d, fstart: %d\n" , fmax, fmin, +DRM_ERROR ("fmax: %d, fmin: %d, fstart: %d\n" , fmax, fmin, fstart);
Error?
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 10 lines · Eric Anholt
From: Jesse Barnes <[email protected]>
Part of the issue here was that Eric slipped in a debug hack for testing the i915 IPS code before the
intel_ips.cdriver had landed. This caused the driver to always use the full range of frequencies, which is only legal when IPS tells us we have the headroom. Once that hack was removed, there was confusion about the driver's frequency clamping variables:max_delayis the driver's current limit on the highest frequency the IPS driver wants us to use, whiledev_priv->fmaxis the hardware-reported limit that the IPS driver can increase up to.
Dropped the promotion to DRM_ERROR and applied to -fixes. Since your changelog says that what we have right now is programming invalid values into the IPS, I've marked it for stable.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre