Re: [PATCH i-g-t 1/3] lib/igt_dummyload: libify checks for spin batch activation

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

 



Quoting Mika Kuoppala (2019-04-17 16:54:56)
> Instead of opencoding the poll into the spinner, use
> a helper to check if spinner has started.
> 
> v2: use zero as presumed offset (Chris)
> 
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> ---
>  lib/igt_dummyload.c            | 35 +++++++++++++++++++---------------
>  lib/igt_dummyload.h            | 17 ++++++++++++++---
>  tests/i915/gem_ctx_exec.c      |  4 +---
>  tests/i915/gem_ctx_isolation.c |  4 ++--
>  tests/i915/gem_eio.c           |  4 ++--
>  tests/i915/gem_exec_latency.c  | 22 ++++++++++-----------
>  tests/i915/gem_exec_schedule.c |  5 ++---
>  tests/i915/gem_sync.c          | 28 ++++++++++++---------------
>  tests/perf_pmu.c               |  4 ++--
>  9 files changed, 66 insertions(+), 57 deletions(-)
> 
> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> index 47f6b92b..064a0246 100644
> --- a/lib/igt_dummyload.c
> +++ b/lib/igt_dummyload.c
> @@ -67,11 +67,13 @@ static pthread_mutex_t list_lock = PTHREAD_MUTEX_INITIALIZER;
>  
>  static void
>  fill_reloc(struct drm_i915_gem_relocation_entry *reloc,
> -          uint32_t gem_handle, uint32_t offset,
> +          uint32_t gem_handle, uint32_t offset, uint32_t delta,
>            uint32_t read_domains, uint32_t write_domains)
>  {
> +       reloc->presumed_offset = 0;
>         reloc->target_handle = gem_handle;
>         reloc->offset = offset * sizeof(uint32_t);
> +       reloc->delta = delta * sizeof(uint32_t);
>         reloc->read_domains = read_domains;
>         reloc->write_domain = write_domains;

If you are going to do this, do it right and
	return reloc->presumed_offset + reloc->delta;
and use that to fill the batch.
-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