[Intel-gfx] [CI 06/19] drm/i915: Make IS_GEN-range macro only take dev_priv

Tvrtko Ursulin tursulin at ursulin.net
Thu Oct 13 10:02:57 UTC 2016


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Saves 944 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: David Weinehall <david.weinehall at linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Acked-by: Jani Nikula <jani.nikula at linux.intel.com>
Acked-by: Chris Wilson <chris at chris-wilson.co.uk>
Acked-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 407be9f02b9b..756ec7ac628a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2619,7 +2619,7 @@ struct drm_i915_cmd_table {
  *
  * Use GEN_FOREVER for unbound start and or end.
  */
-#define IS_GEN(p, s, e) ({ \
+#define IS_GEN(dev_priv, s, e) ({ \
 	unsigned int __s = (s), __e = (e); \
 	BUILD_BUG_ON(!__builtin_constant_p(s)); \
 	BUILD_BUG_ON(!__builtin_constant_p(e)); \
@@ -2629,7 +2629,7 @@ struct drm_i915_cmd_table {
 		__e = BITS_PER_LONG - 1; \
 	else \
 		__e = (e) - 1; \
-	!!(INTEL_INFO(p)->gen_mask & GENMASK((__e), (__s))); \
+	!!((dev_priv)->info.gen_mask & GENMASK((__e), (__s))); \
 })
 
 /*
-- 
2.7.4



More information about the Intel-gfx mailing list