Re: [Intel-gfx] [PATCH 3/3] drm/i915: Allow optimized platform checks

2017-09-25 Thread Tvrtko Ursulin
On 20/09/2017 10:56, Tvrtko Ursulin wrote: On 20/09/2017 10:39, Jani Nikula wrote: On Wed, 20 Sep 2017, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If we store the platform as a bitmask, and convert the IS_PLATFORM macro to use it, we allow

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Allow optimized platform checks

2017-09-20 Thread Tvrtko Ursulin
On 20/09/2017 10:39, Jani Nikula wrote: On Wed, 20 Sep 2017, Tvrtko Ursulin wrote: From: Tvrtko Ursulin 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) ||

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Allow optimized platform checks

2017-09-20 Thread Tvrtko Ursulin
On 20/09/2017 10:27, Tvrtko Ursulin wrote: From: Tvrtko Ursulin 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. Even

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Allow optimized platform checks

2017-09-20 Thread Jani Nikula
On Wed, 20 Sep 2017, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > 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

[Intel-gfx] [PATCH 3/3] drm/i915: Allow optimized platform checks

2017-09-20 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 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. Even with the added BUG_ON this saves almost 1k of