On Thu, Oct 23, 2014 at 6:07 PM, Siluvery, Arun <arun.siluvery@xxxxxxxxxxxxxxx> wrote: > On 23/10/2014 16:51, Daniel Vetter wrote: >> >> On Thu, Oct 23, 2014 at 04:29:30PM +0100, Arun Siluvery wrote: >>> >>> We would want to apply some of the workarounds based on a condition to a >>> particular platform or Gen but we may not know all possible controlling >>> parameters in advance hence allow to define open conditions; a WA makes >>> it to the list only if the condition is true. >>> >>> With the appropriate conditions we can combine all of the workarounds >>> and apply them from a single place irrespective of platform instead of >>> having them in separate functions. >>> >>> For: VIZ-4090 >>> Signed-off-by: Arun Siluvery <arun.siluvery@xxxxxxxxxxxxxxx> >> >> >> Imo we should just pull the condition out into proper control flow. Hiding >> it like that in the macro doesn't seem to buy us anything at all, but >> obfuscates the code. > > > No we are not hiding the condition, I thought it would be easier to read it > this way, e.g., > > WA_SET_BIT_MASKED_IF(IS_BDW_GT3(dev), WA_REG, WA_MASK); > > do you prefer adding if(cond) to each WA? Yes. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx