[Intel-gfx] [PATCH 0/5] IS_GENx and related code shrinkage

Chris Wilson chris at chris-wilson.co.uk
Fri May 6 15:31:30 UTC 2016


On Fri, May 06, 2016 at 04:20:46PM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Our huge amount of "what hardware I am" checks during runtime is somewhat
> distasteful but to deeply ingrained to be easily fixable.
> 
> Instead we can make them more efficient by spotting a few easy ways of helping
> the compiler optimize some common idioms.
> 
> Five patches below save approx. 1.5kB of text in my test build for not a lot of
> source code churn.

A dramatic improvement for such a small tweak. Lgtm,
 
> Tvrtko Ursulin (5):
>   drm/i915: Make IS_GENx macros work on a mask
>   drm/i915: Promote IS_BROADWELL to a simple macro
>   drm/i915: Replace "INTEL_INFO->gen == x" checks with IS_GENx
>   drm/i915: Introduce INTEL_GEN_RANGE macro
>   drm/i915: Do not use a bitfield for INTEL_INFO->num_pipes

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list