drm/i915: s/9/intel_freq_opcode(450)/
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 25 Mar 2015 17:27:16 +0000 (19:27 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 May 2015 11:03:42 +0000 (13:03 +0200)
Replace the hardcoded 9 with a call to intel_freq_opcode(450).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 8812fffeac5e1853a7ceb8d0ea7e89fc2c6b1cff..9e3bfff2d8451e218b643e9d9e045491b194bec9 100644 (file)
@@ -4295,8 +4295,8 @@ static void gen6_init_rps_frequencies(struct drm_device *dev)
        if (dev_priv->rps.min_freq_softlimit == 0) {
                if (IS_HASWELL(dev) || IS_BROADWELL(dev))
                        dev_priv->rps.min_freq_softlimit =
-                               /* max(RPe, 450 MHz) */
-                               max(dev_priv->rps.efficient_freq, (u8) 9);
+                               max_t(int, dev_priv->rps.efficient_freq,
+                                     intel_freq_opcode(dev_priv, 450));
                else
                        dev_priv->rps.min_freq_softlimit =
                                dev_priv->rps.min_freq;