aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-10-13 06:03:03 -0400
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2016-10-14 07:23:19 -0400
commitd9486e65010fedbdbf8337e0d890213620e782f4 (patch)
treeb225002c49ed10063963bdec5dc3186bb4b40840 /drivers/gpu/drm/i915
parent0853723b8956acc9690ace7ab6ea1f50bb997b52 (diff)
drm/i915: Make IS_SKYLAKE only take dev_priv
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>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c2
-rw-r--r--drivers/gpu/drm/i915/intel_guc_loader.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 40b86dcb781b..a354d0e948ec 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2659,7 +2659,7 @@ struct drm_i915_cmd_table {
2659#define IS_CHERRYVIEW(dev) (INTEL_INFO(dev)->is_cherryview) 2659#define IS_CHERRYVIEW(dev) (INTEL_INFO(dev)->is_cherryview)
2660#define IS_HASWELL(dev_priv) ((dev_priv)->info.is_haswell) 2660#define IS_HASWELL(dev_priv) ((dev_priv)->info.is_haswell)
2661#define IS_BROADWELL(dev_priv) ((dev_priv)->info.is_broadwell) 2661#define IS_BROADWELL(dev_priv) ((dev_priv)->info.is_broadwell)
2662#define IS_SKYLAKE(dev) (INTEL_INFO(dev)->is_skylake) 2662#define IS_SKYLAKE(dev_priv) ((dev_priv)->info.is_skylake)
2663#define IS_BROXTON(dev) (INTEL_INFO(dev)->is_broxton) 2663#define IS_BROXTON(dev) (INTEL_INFO(dev)->is_broxton)
2664#define IS_KABYLAKE(dev_priv) ((dev_priv)->info.is_kabylake) 2664#define IS_KABYLAKE(dev_priv) ((dev_priv)->info.is_kabylake)
2665#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) 2665#define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile)
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 179f16b19515..1f788d10b56b 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2135,7 +2135,7 @@ static void gtt_write_workarounds(struct drm_device *dev)
2135 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW); 2135 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW);
2136 else if (IS_CHERRYVIEW(dev)) 2136 else if (IS_CHERRYVIEW(dev))
2137 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV); 2137 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV);
2138 else if (IS_SKYLAKE(dev)) 2138 else if (IS_SKYLAKE(dev_priv))
2139 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL); 2139 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL);
2140 else if (IS_BROXTON(dev)) 2140 else if (IS_BROXTON(dev))
2141 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT); 2141 I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT);
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 8eb49685dfdd..688b68a7ae1e 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -728,7 +728,7 @@ void intel_guc_init(struct drm_device *dev)
728 728
729 if (!HAS_GUC_UCODE(dev)) { 729 if (!HAS_GUC_UCODE(dev)) {
730 fw_path = NULL; 730 fw_path = NULL;
731 } else if (IS_SKYLAKE(dev)) { 731 } else if (IS_SKYLAKE(dev_priv)) {
732 fw_path = I915_SKL_GUC_UCODE; 732 fw_path = I915_SKL_GUC_UCODE;
733 guc_fw->guc_fw_major_wanted = SKL_FW_MAJOR; 733 guc_fw->guc_fw_major_wanted = SKL_FW_MAJOR;
734 guc_fw->guc_fw_minor_wanted = SKL_FW_MINOR; 734 guc_fw->guc_fw_minor_wanted = SKL_FW_MINOR;