[igt-dev] [PATCH i-g-t] lib/i915: Use intel_ctx_0() for submission tests (v2)

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Jun 16 20:28:01 UTC 2021


On Wed, 16 Jun 2021 10:08:39 -0700, Jason Ekstrand wrote:
>
> This does make the assumption that ctx0 has the default set of engines
> but, now that we've converted everything to intel_ctx_t, this assumption
> should be ok.
>
> v2 (Zbigniew Kempczyński):
>  - Use for_each_ctx_engine with intel_ctx_0() instead of
>    for_each_physical_ring()
>
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> ---
>  lib/i915/gem_submission.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
> index bd4bbb3ef..1af009fb1 100644
> --- a/lib/i915/gem_submission.c
> +++ b/lib/i915/gem_submission.c
> @@ -202,7 +202,7 @@ void gem_test_engine(int i915, unsigned int engine)
>	if (engine == ALL_ENGINES) {
>		const struct intel_execution_engine2 *e2;
>
> -		__for_each_physical_engine(i915, e2) {
> +		for_each_ctx_engine(i915, intel_ctx_0(i915), e2) {
>			execbuf.flags = e2->flags;
>			gem_execbuf(i915, &execbuf);
>		}
> @@ -385,7 +385,7 @@ unsigned int gem_submission_measure(int i915, unsigned int engine)
>		struct intel_execution_engine2 *e;
>
>		size = -1;
> -		__for_each_physical_engine(i915, e) {
> +		for_each_ctx_engine(i915, intel_ctx_0(i915), e) {

Maybe I am missing something but I really am not following why we are
changing these loops to iterate only on legacy/static engines when
previously __for_each_physical_engine iterates on all present engines?


More information about the igt-dev mailing list