drm/i915: prefer INTEL_GEN() over INTEL_INFO()->gen
authorJani Nikula <jani.nikula@intel.com>
Thu, 26 Apr 2018 11:35:21 +0000 (14:35 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 26 Apr 2018 15:14:29 +0000 (18:14 +0300)
Prefer INTEL_GEN() over INTEL_INFO()->gen except in special
circumstances.

v2: don't change device info dump (Chris)

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180426113521.28417-1-jani.nikula@intel.com
drivers/gpu/drm/i915/intel_device_info.c

index a32ba72c514e211f3de684165894538356450715..0fd13df424cf19719958b5de465cebec849895c3 100644 (file)
@@ -848,7 +848,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info)
                gen9_sseu_info_init(dev_priv);
        else if (INTEL_GEN(dev_priv) == 10)
                gen10_sseu_info_init(dev_priv);
-       else if (INTEL_INFO(dev_priv)->gen >= 11)
+       else if (INTEL_GEN(dev_priv) >= 11)
                gen11_sseu_info_init(dev_priv);
 
        /* Initialize command stream timestamp frequency */