All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags
@ 2017-02-08  2:00 Michel Thierry
  2017-02-08 12:42 ` Joonas Lahtinen
  0 siblings, 1 reply; 5+ messages in thread
From: Michel Thierry @ 2017-02-08  2:00 UTC (permalink / raw)
  To: intel-gfx

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@intel.com>
---
 lib/igt_gt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index e44b6db1..d83e23a1 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -45,8 +45,8 @@ igt_hang_t igt_hang_ctx(int fd,
 			int ring,
 			unsigned flags,
 			uint64_t *offset);
-#define HANG_ALLOW_BAN 1
-#define HANG_ALLOW_CAPTURE 2
+#define HANG_ALLOW_BAN		(1<<0)
+#define HANG_ALLOW_CAPTURE	(1<<1)
 
 igt_hang_t igt_hang_ring(int fd, int ring);
 void igt_post_hang_ring(int fd, igt_hang_t arg);
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags
  2017-02-08  2:00 [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags Michel Thierry
@ 2017-02-08 12:42 ` Joonas Lahtinen
  2017-02-08 12:49   ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2017-02-08 12:42 UTC (permalink / raw)
  To: Michel Thierry, intel-gfx

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@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;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags
  2017-02-08 12:42 ` Joonas Lahtinen
@ 2017-02-08 12:49   ` Chris Wilson
  2017-02-08 18:25     ` Michel Thierry
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2017-02-08 12:49 UTC (permalink / raw)
  To: Joonas Lahtinen; +Cc: intel-gfx

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@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.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags
  2017-02-08 12:49   ` Chris Wilson
@ 2017-02-08 18:25     ` Michel Thierry
  2017-02-08 18:39       ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Michel Thierry @ 2017-02-08 18:25 UTC (permalink / raw)
  To: Chris Wilson, Joonas Lahtinen, intel-gfx



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@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


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags
  2017-02-08 18:25     ` Michel Thierry
@ 2017-02-08 18:39       ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-02-08 18:39 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx

On Wed, Feb 08, 2017 at 10:25:19AM -0800, Michel Thierry wrote:
> 
> 
> 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@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?

BIT(), test_bit, set_bit, clear_bit...

If you are willing to write them, please do! Make us feel at home :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-08 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08  2:00 [PATCH i-g-t] lib/igt_gt: Define HANG_ALLOW_* as bit flags Michel Thierry
2017-02-08 12:42 ` Joonas Lahtinen
2017-02-08 12:49   ` Chris Wilson
2017-02-08 18:25     ` Michel Thierry
2017-02-08 18:39       ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.