drm/i915: Inline gen6_sanitize_rps_pm_mask()
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 12 Mar 2017 13:54:26 +0000 (13:54 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 13 Mar 2017 14:24:58 +0000 (14:24 +0000)
gen6_sanitize_rps_pm_mask() is small enough that inlining it shrinks the
object code.

v2: Use const markup

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170312135426.2216-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_drv.h

index 89ccf3e1fda59f747320f23d2bf80c5ed1f215cf..b8a0afdc26a273f57b176abce3f350ff673693b2 100644 (file)
@@ -389,11 +389,6 @@ void gen6_enable_rps_interrupts(struct drm_i915_private *dev_priv)
        spin_unlock_irq(&dev_priv->irq_lock);
 }
 
-u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask)
-{
-       return (mask & ~dev_priv->rps.pm_intrmsk_mbz);
-}
-
 void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv)
 {
        if (!READ_ONCE(dev_priv->rps.interrupts_enabled))
index 937623ff6d7c7972e3121cd31a50c693000cbbb7..51228fe4283b00b09565150e64d7110f914e5d5c 100644 (file)
@@ -1188,7 +1188,13 @@ void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
 void gen6_reset_rps_interrupts(struct drm_i915_private *dev_priv);
 void gen6_enable_rps_interrupts(struct drm_i915_private *dev_priv);
 void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv);
-u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask);
+
+static inline u32 gen6_sanitize_rps_pm_mask(const struct drm_i915_private *i915,
+                                           u32 mask)
+{
+       return mask & ~i915->rps.pm_intrmsk_mbz;
+}
+
 void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv);
 void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv);
 static inline bool intel_irqs_enabled(struct drm_i915_private *dev_priv)