From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91FE96E945 for ; Fri, 6 Aug 2021 04:56:52 +0000 (UTC) Date: Thu, 05 Aug 2021 21:39:34 -0700 Message-ID: <87zgtvrxtl.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210726200026.4815-25-zbigniew.kempczynski@intel.com> References: <20210726200026.4815-1-zbigniew.kempczynski@intel.com> <20210726200026.4815-25-zbigniew.kempczynski@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Subject: Re: [igt-dev] [PATCH i-g-t v3 24/52] tests/gem_exec_parallel: Adopt to use alloctor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Zbigniew =?ISO-8859-2?Q?Kempczy=F1ski?= Cc: igt-dev@lists.freedesktop.org, Petri Latvala List-ID: On Mon, 26 Jul 2021 12:59:58 -0700, Zbigniew Kempczy=F1ski wrote: > Reviewed-by: Ashutosh Dixit A couple of comments below. > @@ -112,7 +116,7 @@ static void *thread(void *data) > reloc.delta =3D 4*t->id; > obj[1].handle =3D gem_create(fd, 4096); > obj[1].relocs_ptr =3D to_user_pointer(&reloc); > - obj[1].relocation_count =3D 1; > + obj[1].relocation_count =3D !t->ahnd ? 1 : 0; > gem_write(fd, obj[1].handle, 0, batch, sizeof(batch)); > > memset(&execbuf, 0, sizeof(execbuf)); > @@ -140,6 +144,18 @@ static void *thread(void *data) > if (t->flags & FDS) > obj[0].handle =3D gem_open(fd, obj[0].handle); > > + if (t->ahnd) { > + offset =3D t->offsets[x]; > + i =3D 0; > + batch[++i] =3D offset + 4*t->id; > + batch[++i] =3D offset >> 32; > + obj[0].offset =3D offset; > + obj[0].flags |=3D EXEC_OBJECT_PINNED | EXEC_OBJECT_WRITE; > + obj[1].offset =3D get_offset(t->ahnd, obj[1].handle, 4096, 0); > + obj[1].flags |=3D EXEC_OBJECT_PINNED; > + gem_write(fd, obj[1].handle, 0, batch, sizeof(batch)); It was probably cleaner to eliminate the previous gem_write() above for batch initialization, but I guess this works too. > @@ -213,6 +229,7 @@ static void all(int fd, const intel_ctx_t *ctx, > void *arg[NUMOBJ]; > int go; > int i; > + uint64_t ahnd =3D get_reloc_ahnd(fd, 0), offsets[NUMOBJ]; > > if (flags & CONTEXTS) When CONTEXTS flag is set it ahnd should probably be tied to the context but here we have it tied to context 0, which is probably not exactly correct but works?