From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34D2810E5A0 for ; Fri, 12 May 2023 05:07:29 +0000 (UTC) Date: Thu, 11 May 2023 22:07:23 -0700 Message-ID: <87r0rmdto4.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230506005528.1890922-5-umesh.nerlige.ramappa@intel.com> References: <20230506005528.1890922-1-umesh.nerlige.ramappa@intel.com> <20230506005528.1890922-5-umesh.nerlige.ramappa@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 04/15] perf_pmu: Quiesce GPU if measuring idle busyness without spinner 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, 05 May 2023 17:55:17 -0700, Umesh Nerlige Ramappa wrote: > > The assumption in some tests is that the engines are not busy if no > spinners are being run. This is not true in some cases where we see > that the render is busy at the start of the test. Quiesce GPU to wait > for such work to complete before checking for idle busyness. > > v2: Move gem_quiescent_gpu to beginning of test (Tvrtko) Reviewed-by: Ashutosh Dixit > > Signed-off-by: Umesh Nerlige Ramappa > --- > tests/i915/perf_pmu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c > index 0b1177785..6080c5fdc 100644 > --- a/tests/i915/perf_pmu.c > +++ b/tests/i915/perf_pmu.c > @@ -279,6 +279,7 @@ single(int gem_fd, const intel_ctx_t *ctx, > int fd; > uint64_t ahnd = get_reloc_ahnd(gem_fd, ctx->id); > > + gem_quiescent_gpu(gem_fd); > fd = open_pmu(gem_fd, I915_PMU_ENGINE_BUSY(e->class, e->instance)); > > if (flags & TEST_BUSY) > @@ -639,6 +640,7 @@ no_sema(int gem_fd, const intel_ctx_t *ctx, > int fd[2]; > uint64_t ahnd = get_reloc_ahnd(gem_fd, ctx->id); > > + gem_quiescent_gpu(gem_fd); > fd[0] = open_group(gem_fd, I915_PMU_ENGINE_SEMA(e->class, e->instance), > -1); > fd[1] = open_group(gem_fd, I915_PMU_ENGINE_WAIT(e->class, e->instance), > -- > 2.34.1 >