Re: [igt-dev] [PATCH i-g-t 12/27] gem_wsim: Engine map support

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

 



Quoting Tvrtko Ursulin (2019-05-20 15:47:24)
> @@ -999,30 +1092,53 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
>         /*
>          * Identify if contexts target specific engine instances and if they
>          * want to be balanced.
> +        *
> +        * Transfer over engine map configuration from the workload step.
>          */
>         for (j = 0; j < wrk->nr_ctxs; j += 2) {
>                 bool targets = false;
>                 bool balance = false;
>  
>                 for (i = 0, w = wrk->steps; i < wrk->nr_steps; i++, w++) {
> -                       if (w->type != BATCH)
> -                               continue;
> -
>                         if (w->context != (j / 2))
>                                 continue;
>  
> -                       if (w->engine == VCS)
> -                               balance = true;
> -                       else
> -                               targets = true;
> +                       if (w->type == BATCH) {
> +                               if (w->engine == VCS)
> +                                       balance = true;
> +                               else
> +                                       targets = true;
> +                       } else if (w->type == ENGINE_MAP) {
> +                               wrk->ctx_list[j].engine_map = w->engine_map;
> +                               wrk->ctx_list[j].engine_map_count =
> +                                       w->engine_map_count;
> +                       }
>                 }
>  
> -               if (flags & I915) {
> -                       wrk->ctx_list[j].targets_instance = targets;
> +               wrk->ctx_list[j].targets_instance = targets;
> +               if (flags & I915)
>                         wrk->ctx_list[j].wants_balance = balance;
> +       }
> +
> +       /*
> +        * Ensure VCS is not allowed with engine map contexts.
> +        */
> +       for (j = 0; j < wrk->nr_ctxs; j += 2) {
> +               for (i = 0, w = wrk->steps; i < wrk->nr_steps; i++, w++) {
> +                       if (w->context != (j / 2))
> +                               continue;
> +
> +                       if (w->type != BATCH)
> +                               continue;
> +
> +                       if (wrk->ctx_list[j].engine_map && w->engine == VCS) {
> +                               wsim_err("Batches targetting engine maps must use explicit engines!\n");
> +                               return -1;
> +                       }
>                 }
>         }
>  
> +
^^^

>         /*
>          * Create and configure contexts.
>          */

I'm helping!
-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