[Intel-gfx] [PATCH v3 3/3] drm/i915: merge gen checks to use range

2018-12-05 Thread Lucas De Marchi
Instead of using IS_GEN() for consecutive gen checks, let's pass the range to IS_GEN_RANGE(). By code inspection these were the ranges deemed necessary for spatch: @@ expression e; @@ ( - IS_GEN(e, 3) || IS_GEN(e, 2) + IS_GEN_RANGE(e, 2, 3) | - IS_GEN(e, 3) || IS_GEN(e, 4) + IS_GEN_RANGE(e, 3, 4)

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: merge gen checks to use range

2018-12-11 Thread Jani Nikula
On Wed, 05 Dec 2018, Lucas De Marchi wrote: > Instead of using IS_GEN() for consecutive gen checks, let's pass the > range to IS_GEN_RANGE(). By code inspection these were the ranges deemed > necessary for spatch: > > @@ > expression e; > @@ > ( > - IS_GEN(e, 3) || IS_GEN(e, 2) > + IS_GEN_RANGE(e,

Re: [Intel-gfx] [PATCH v3 3/3] drm/i915: merge gen checks to use range

2018-12-12 Thread Rodrigo Vivi
On Tue, Dec 11, 2018 at 04:35:57PM +0200, Jani Nikula wrote: > On Wed, 05 Dec 2018, Lucas De Marchi wrote: > > Instead of using IS_GEN() for consecutive gen checks, let's pass the > > range to IS_GEN_RANGE(). By code inspection these were the ranges deemed > > necessary for spatch: > > > > @@ > >