]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Make IS_SKYLAKE only take dev_priv
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 13 Oct 2016 10:03:03 +0000 (11:03 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Fri, 14 Oct 2016 11:23:19 +0000 (12:23 +0100)
Saves 1016 bytes of .rodata strings and couple hundred of .text.

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_gem_gtt.c
drivers/gpu/drm/i915/intel_guc_loader.c

index 40b86dcb781b7735a6b5c0d6450536f16e4a7146..a354d0e948ecf5379bf50d654960d61e439ec37b 100644 (file)
@@ -2659,7 +2659,7 @@ struct drm_i915_cmd_table {
 #define IS_CHERRYVIEW(dev)     (INTEL_INFO(dev)->is_cherryview)
 #define IS_HASWELL(dev_priv)   ((dev_priv)->info.is_haswell)
 #define IS_BROADWELL(dev_priv) ((dev_priv)->info.is_broadwell)
-#define IS_SKYLAKE(dev)        (INTEL_INFO(dev)->is_skylake)
+#define IS_SKYLAKE(dev_priv)   ((dev_priv)->info.is_skylake)
 #define IS_BROXTON(dev)                (INTEL_INFO(dev)->is_broxton)
 #define IS_KABYLAKE(dev_priv)  ((dev_priv)->info.is_kabylake)
 #define IS_MOBILE(dev)         (INTEL_INFO(dev)->is_mobile)
index 179f16b19515bd86c0ffb73afdc747c86767c29d..1f788d10b56bb267a8ed1fbdf483bcfd4c83ad44 100644 (file)
@@ -2135,7 +2135,7 @@ static void gtt_write_workarounds(struct drm_device *dev)
                I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW);
        else if (IS_CHERRYVIEW(dev))
                I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV);
-       else if (IS_SKYLAKE(dev))
+       else if (IS_SKYLAKE(dev_priv))
                I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL);
        else if (IS_BROXTON(dev))
                I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT);
index 8eb49685dfdd8a9b6152cbe97e76fb5ea0f08ff7..688b68a7ae1eba0e78dbf20674c962a12d26362a 100644 (file)
@@ -728,7 +728,7 @@ void intel_guc_init(struct drm_device *dev)
 
        if (!HAS_GUC_UCODE(dev)) {
                fw_path = NULL;
-       } else if (IS_SKYLAKE(dev)) {
+       } else if (IS_SKYLAKE(dev_priv)) {
                fw_path = I915_SKL_GUC_UCODE;
                guc_fw->guc_fw_major_wanted = SKL_FW_MAJOR;
                guc_fw->guc_fw_minor_wanted = SKL_FW_MINOR;