From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2F5386E06B for ; Sat, 12 Jun 2021 01:49:37 +0000 (UTC) Date: Fri, 11 Jun 2021 18:42:27 -0700 Message-ID: <87fsxnn9j0.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210609173632.248880-22-jason@jlekstrand.net> References: <20210609173632.248880-1-jason@jlekstrand.net> <20210609173632.248880-22-jason@jlekstrand.net> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH i-g-t 21/93] tests/i915/perf_pmu: Convert to intel_ctx_t List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Jason Ekstrand Cc: igt-dev@lists.freedesktop.org List-ID: On Wed, 09 Jun 2021 10:36:04 -0700, Jason Ekstrand wrote: > > @@ -2107,48 +2130,48 @@ igt_main > * Test that a single engine metric can be initialized or it > * is correctly rejected. > */ > - test_each_engine("init-busy", fd, e) > + test_each_engine("init-busy", fd, ctx, e) > init(fd, e, I915_SAMPLE_BUSY); > > - test_each_engine("init-wait", fd, e) > + test_each_engine("init-wait", fd, ctx, e) > init(fd, e, I915_SAMPLE_WAIT); > > - test_each_engine("init-sema", fd, e) > + test_each_engine("init-sema", fd, ctx, e) > init(fd, e, I915_SAMPLE_SEMA); To be completely equivalent to the previous code it seems we should be passing in ctx into init() so that ctx->id can be passed into gem_context_has_engine() instead of id 0. Since only ctx has all engines and ctx 0 only has legacy engines (unlike previous code where ctx 0 had all engines). > /** > * Check render nodes are counted. > */ > igt_subtest_group { > int render_fd = -1; > + const intel_ctx_t *render_ctx = NULL; > > igt_fixture { > render_fd = __drm_open_driver_render(DRIVER_INTEL); > igt_require_gem(render_fd); > + render_ctx = intel_ctx_create_all_physical(render_fd); > > gem_quiescent_gpu(fd); > } > > - test_each_engine("render-node-busy", render_fd, e) > - single(render_fd, e, TEST_BUSY); > - test_each_engine("render-node-busy-idle", render_fd, e) > - single(render_fd, e, TEST_BUSY | TEST_TRAILING_IDLE); > + test_each_engine("render-node-busy", render_fd, ctx, e) Shouldn't this be render_ctx instead of ctx? > + single(render_fd, render_ctx, e, TEST_BUSY); > + test_each_engine("render-node-busy-idle", render_fd, ctx, e) Shouldn't this be render_ctx instead of ctx? Everthing else seems to be fine. _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev