[Intel-gfx] [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags

Michel Thierry michel.thierry at intel.com
Wed Feb 8 18:25:19 UTC 2017



On 08/02/17 04:49, Chris Wilson wrote:
> On Wed, Feb 08, 2017 at 02:42:03PM +0200, Joonas Lahtinen wrote:
>> On ti, 2017-02-07 at 18:00 -0800, Michel Thierry wrote:
>>> As that is what they are meant to be. It will prevent any confusion if we
>>> have to add other flags in the future.
>>>
>>> Signed-off-by: Michel Thierry <michel.thierry at intel.com>
>>
>> <SNIP>
>>
>>> -#define HANG_ALLOW_BAN 1
>>> -#define HANG_ALLOW_CAPTURE 2
>>> +#define HANG_ALLOW_BAN		(1<<0)
>>> +#define HANG_ALLOW_CAPTURE	(1<<1)
>>
>> Make them BIT(0) and BIT(1), and this is;
>
> This is igt and BIT() is already a hodge-podge of different macros.

I see at least 3 different BIT macros already (Chris added the one we 
want in lib/intel_device_info.c)

I can volunteer to move it to one of the header files, replace all the 
1<<x with BIT and rename the ones in igt_draw/intel_audio_dump... thoughts?

-Michel




More information about the Intel-gfx mailing list