From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67C266E05D for ; Wed, 16 Jun 2021 20:28:05 +0000 (UTC) Date: Wed, 16 Jun 2021 13:28:01 -0700 Message-ID: <87k0mt367i.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210616170839.484410-1-jason@jlekstrand.net> References: <20210614163902.366168-5-jason@jlekstrand.net> <20210616170839.484410-1-jason@jlekstrand.net> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t] lib/i915: Use intel_ctx_0() for submission tests (v2) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Jason Ekstrand Cc: igt-dev@lists.freedesktop.org List-ID: 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=F1ski): > - Use for_each_ctx_engine with intel_ctx_0() instead of > for_each_physical_ring() > > Signed-off-by: Jason Ekstrand > --- > 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 =3D=3D 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 =3D e2->flags; > gem_execbuf(i915, &execbuf); > } > @@ -385,7 +385,7 @@ unsigned int gem_submission_measure(int i915, unsigne= d int engine) > struct intel_execution_engine2 *e; > > size =3D -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? _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev