Commit c1812bdb authored by Tvrtko Ursulin's avatar Tvrtko Ursulin

drm/i915: Make IS_GEN-range macro only take dev_priv

Saves 944 bytes of .rodata strings.

v2: Add parantheses around dev_priv. (Ville Syrjala)
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: default avatarJani Nikula <jani.nikula@linux.intel.com>
Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent 70006ad6
...@@ -2612,7 +2612,7 @@ struct drm_i915_cmd_table { ...@@ -2612,7 +2612,7 @@ struct drm_i915_cmd_table {
* *
* Use GEN_FOREVER for unbound start and or end. * 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); \ unsigned int __s = (s), __e = (e); \
BUILD_BUG_ON(!__builtin_constant_p(s)); \ BUILD_BUG_ON(!__builtin_constant_p(s)); \
BUILD_BUG_ON(!__builtin_constant_p(e)); \ BUILD_BUG_ON(!__builtin_constant_p(e)); \
...@@ -2622,7 +2622,7 @@ struct drm_i915_cmd_table { ...@@ -2622,7 +2622,7 @@ struct drm_i915_cmd_table {
__e = BITS_PER_LONG - 1; \ __e = BITS_PER_LONG - 1; \
else \ else \
__e = (e) - 1; \ __e = (e) - 1; \
!!(INTEL_INFO(p)->gen_mask & GENMASK((__e), (__s))); \ !!((dev_priv)->info.gen_mask & GENMASK((__e), (__s))); \
}) })
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment