From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 428E86E0F6 for ; Fri, 6 Aug 2021 20:57:29 +0000 (UTC) Date: Fri, 06 Aug 2021 13:57:27 -0700 Message-ID: <87pmuquw94.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210806134145.24634-15-zbigniew.kempczynski@intel.com> References: <20210806134145.24634-1-zbigniew.kempczynski@intel.com> <20210806134145.24634-15-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 v4 14/56] tests/gem_ctx_isolation: Adopt to use allocator 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 Fri, 06 Aug 2021 06:41:03 -0700, Zbigniew Kempczy=F1ski wrote: > > For newer gens we're not able to rely on relocations. Adopt to use > offsets acquired from the allocator. Couple of fixes needed below, with that: Reviewed-by: Ashutosh Dixit > @@ -353,6 +360,7 @@ static uint32_t read_regs(int fd, > gem_execbuf(fd, &execbuf); > gem_close(fd, obj[1].handle); > free(reloc); > + put_offset(ahnd, obj[1].handle); put_offset(ahnd, obj[0].handle)? > @@ -494,6 +510,7 @@ static void restore_regs(int fd, > execbuf.rsvd1 =3D ctx->id; > gem_execbuf(fd, &execbuf); > gem_close(fd, obj[1].handle); > + put_offset(ahnd, obj[1].offset); put_offset(ahnd, obj[0].handle)? > @@ -781,7 +816,9 @@ static void inject_reset_context(int fd, const intel_= ctx_cfg_t *cfg, > const struct intel_execution_engine2 *e) > { > const intel_ctx_t *ctx =3D create_reset_context(fd, cfg); > + uint64_t ahnd =3D get_reloc_ahnd(fd, ctx->id); > struct igt_spin_factory opts =3D { > + .ahnd =3D ahnd, > .ctx =3D ctx, > .engine =3D e->flags, > .flags =3D IGT_SPIN_FAST, put_ahnd?