Re: [PATCH i-g-t] lib/dummyload: Cleanup access to spin obj array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mika Kuoppala (2019-05-22 10:13:46)
> Instead of relying a static obj array inside igt_spin_t,
> access it with proper indexing.
> 
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> ---
>  lib/igt_dummyload.c            | 32 +++++++++++++++-----------------
>  lib/igt_dummyload.h            |  1 +
>  tests/i915/gem_exec_schedule.c | 25 +++++++++++++++----------
>  tests/i915/gem_softpin.c       |  2 +-
>  tests/i915/gem_spin_batch.c    |  4 ++--
>  tests/i915/i915_hangman.c      |  2 +-
>  6 files changed, 35 insertions(+), 31 deletions(-)
> 
> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> index 15d64fad..b2da222e 100644
> --- a/lib/igt_dummyload.c
> +++ b/lib/igt_dummyload.c
> @@ -72,7 +72,6 @@ emit_recursive_batch(igt_spin_t *spin,
>                      int fd, const struct igt_spin_factory *opts)
>  {
>  #define SCRATCH 0
> -#define BATCH 1

#define BATCH IGT_SPIN_BATCH

> diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
> index 61a9f2fc..f7772b90 100644
> --- a/lib/igt_dummyload.h
> +++ b/lib/igt_dummyload.h
> @@ -42,6 +42,7 @@ typedef struct igt_spin {
>  
>         int out_fence;
>         struct drm_i915_gem_exec_object2 obj[2];
> +#define SPIN_OBJ_BATCH   1

Leading IGT_SPIN to match type.
IGT_SPIN_BATCH is unique enough for the moment.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux