From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id B38AE10E1A5 for ; Sat, 19 Feb 2022 02:52:01 +0000 (UTC) Date: Fri, 18 Feb 2022 18:39:45 -0800 Message-ID: <87h78v7f66.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Jasmine Newsome In-Reply-To: <20220219013215.3531766-3-jasmine.newsome@intel.com> References: <20220219013215.3531766-1-jasmine.newsome@intel.com> <20220219013215.3531766-3-jasmine.newsome@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915/gem_spin_batch: Removing context persistence List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Fri, 18 Feb 2022 17:32:15 -0800, Jasmine Newsome wrote: > > diff --git a/tests/i915/gem_spin_batch.c b/tests/i915/gem_spin_batch.c > index 653812c7..707d69b6 100644 > --- a/tests/i915/gem_spin_batch.c > +++ b/tests/i915/gem_spin_batch.c > @@ -161,8 +161,6 @@ static void spin_all(int i915, const intel_ctx_t *ctx, unsigned int flags) > .engine = e->flags, > .flags = (IGT_SPIN_POLL_RUN | > IGT_SPIN_NO_PREEMPTION)); > - if (flags & PARALLEL_SPIN_NEW_CTX) > - intel_ctx_destroy(i915, ctx); > > igt_spin_busywait_until_started(spin); > igt_list_move(&spin->link, &list); > @@ -172,6 +170,8 @@ static void spin_all(int i915, const intel_ctx_t *ctx, unsigned int flags) > igt_assert(gem_bo_busy(i915, spin->handle)); > ahnd = spin->ahnd; > igt_spin_end(spin); > + if (flags & PARALLEL_SPIN_NEW_CTX) > + intel_ctx_destroy(i915, spin->opts.ctx); To be safe I think we should move this after gem_sync(). Anyway I am fine with the patches now. Let's see if anyone else has comments/objections, otherwise I can fix this up before merging. > gem_sync(i915, spin->handle); > igt_spin_free(i915, spin); > put_ahnd(ahnd); > -- > 2.25.1 >