[igt-dev] [PATCH i-g-t 02/14] benchmarks/gem_wsim: reposition the unbound duration boolean
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Tue Sep 26 10:23:58 UTC 2023
On 26/09/2023 09:44, Marcin Bernatowicz wrote:
> All duration info is now in struct duration of w_step.
>
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> ---
> benchmarks/gem_wsim.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
> index 7b5e62a3b..90a36f7de 100644
> --- a/benchmarks/gem_wsim.c
> +++ b/benchmarks/gem_wsim.c
> @@ -73,6 +73,7 @@ enum intel_engine_id {
>
> struct duration {
> unsigned int min, max;
> + bool unbound_duration;
I guess '_duration' suffix is now redundant so with it removed:
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
P.S. I trust the patch is useful for later in the series, haven't gotten
that far yet.
> };
>
> enum w_type
> @@ -145,7 +146,6 @@ struct w_step
> unsigned int context;
> unsigned int engine;
> struct duration duration;
> - bool unbound_duration;
> struct deps data_deps;
> struct deps fence_deps;
> int emit_fence;
> @@ -1130,7 +1130,7 @@ parse_workload(struct w_arg *arg, unsigned int flags, double scale_dur,
> check_arg(intel_gen(intel_get_drm_devid(fd)) < 8,
> "Infinite batch at step %u needs Gen8+!\n",
> nr_steps);
> - step.unbound_duration = true;
> + step.duration.unbound_duration = true;
> } else {
> tmpl = strtol(field, &sep, 10);
> check_arg(tmpl <= 0 || tmpl == LONG_MIN ||
> @@ -2172,8 +2172,8 @@ update_bb_start(struct workload *wrk, struct w_step *w)
>
> /* ticks is inverted for MI_DO_COMPARE (less-than comparison) */
> ticks = 0;
> - if (!w->unbound_duration)
> - ticks = ~ns_to_ctx_ticks(1000 * get_duration(wrk, w));
> + if (!w->duration.unbound_duration)
> + ticks = ~ns_to_ctx_ticks(1000LL * get_duration(wrk, w));
>
> *w->bb_duration = ticks;
> }
> @@ -2349,7 +2349,7 @@ static void *run_workload(void *data)
>
> igt_assert(t_idx >= 0 && t_idx < i);
> igt_assert(wrk->steps[t_idx].type == BATCH);
> - igt_assert(wrk->steps[t_idx].unbound_duration);
> + igt_assert(wrk->steps[t_idx].duration.unbound_duration);
>
> *wrk->steps[t_idx].bb_duration = 0xffffffff;
> __sync_synchronize();
More information about the igt-dev
mailing list