]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Make IS_GENx macros work on a mask
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Tue, 10 May 2016 09:57:04 +0000 (10:57 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 11 May 2016 11:27:27 +0000 (12:27 +0100)
commit76f1849087ae08e602a6de46dc613882177e8c22
treeaf256c3c4d8059deb41a50ace3b231d6ec9c37ef
parent3bede33d31bb4445b4c819ba0c2bbd90e9cb7b7e
drm/i915: Make IS_GENx macros work on a mask

If instead of numerical comparison me make these test a
bitmask, we enable the compiler to optimize all instances
of IS_GENx || IS_GENy.

v2: Make bit zero of gen mask mean gen 1.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_uncore.c