drm/i915: Replace some negative Gen checks
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 9 Feb 2018 21:58:47 +0000 (21:58 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Feb 2018 22:29:07 +0000 (22:29 +0000)
Instead of INTEL_GEN != x use !IS_GENx for more optimisation
opportunities.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180208130606.15556-16-tvrtko.ursulin@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180209215847.6660-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_pm.c

index 6f98d144924e1b93fd861d27e88c8e0efbd9f2b1..b026b020d8b83839f8544c7defa828eed90f507d 100644 (file)
@@ -7554,7 +7554,7 @@ unsigned long i915_chipset_val(struct drm_i915_private *dev_priv)
 {
        unsigned long val;
 
-       if (INTEL_GEN(dev_priv) != 5)
+       if (!IS_GEN5(dev_priv))
                return 0;
 
        spin_lock_irq(&mchdev_lock);
@@ -7638,7 +7638,7 @@ static void __i915_update_gfx_val(struct drm_i915_private *dev_priv)
 
 void i915_update_gfx_val(struct drm_i915_private *dev_priv)
 {
-       if (INTEL_GEN(dev_priv) != 5)
+       if (!IS_GEN5(dev_priv))
                return;
 
        spin_lock_irq(&mchdev_lock);
@@ -7689,7 +7689,7 @@ unsigned long i915_gfx_val(struct drm_i915_private *dev_priv)
 {
        unsigned long val;
 
-       if (INTEL_GEN(dev_priv) != 5)
+       if (!IS_GEN5(dev_priv))
                return 0;
 
        spin_lock_irq(&mchdev_lock);