drm/i915: Make HAS_L3_DPF only take dev_priv
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 13 Oct 2016 10:03:05 +0000 (11:03 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 14 Oct 2016 11:23:19 +0000 (12:23 +0100)
Saves 472 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Jani Nikula <jani.nikula@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c

index 39d685020f6e5f68e1055e013d3451fc9f5fccc3..93ce0e9ada5016cc91ffe7c9976e256024c063f1 100644 (file)
@@ -2865,7 +2865,7 @@ struct drm_i915_cmd_table {
 #define HAS_GMCH_DISPLAY(dev_priv) ((dev_priv)->info.has_gmch_display)
 
 /* DPF == dynamic parity feature */
-#define HAS_L3_DPF(dev) (INTEL_INFO(dev)->has_l3_dpf)
+#define HAS_L3_DPF(dev_priv) ((dev_priv)->info.has_l3_dpf)
 #define NUM_L3_SLICES(dev_priv) (IS_HSW_GT3(dev_priv) ? \
                                 2 : HAS_L3_DPF(dev_priv))
 
index a450edaec33db49bd2b02c708519dca26861c347..d09f16edff76c9c8bf66fe3b0aaf6233d0a88b1b 100644 (file)
@@ -3589,7 +3589,7 @@ static void gen5_gt_irq_postinstall(struct drm_device *dev)
        pm_irqs = gt_irqs = 0;
 
        dev_priv->gt_irq_mask = ~0;
-       if (HAS_L3_DPF(dev)) {
+       if (HAS_L3_DPF(dev_priv)) {
                /* L3 parity interrupt is always unmasked. */
                dev_priv->gt_irq_mask = ~GT_PARITY_ERROR(dev_priv);
                gt_irqs |= GT_PARITY_ERROR(dev_priv);