Re: [PATCH v2] drm/i915: Allow optimized platform checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2017-09-27 17:41:38)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> If we store the platform as a bitmask, and convert the
> IS_PLATFORM macro to use it, we allow the compiler to
> merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks
> into a single conditional.
> 
> As a secondary benefit this saves almost 1k of text:
> 
>     text           data     bss     dec     hex filename
> -1460254          60014    3656 1523924  1740d4 drivers/gpu/drm/i915/i915.ko
> +1459260          60026    3656 1522942  173cfe drivers/gpu/drm/i915/i915.ko
> 
> v2: Removed the infamous -1.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>

I checked a few of our IS_*() to make sure we were not storing any
inside a local int which may cause a few surprises (but unlikely if they
are ever used outside of boolean contxt).

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux