All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v4 9/9] drm/i915/perf: Add support for OA media units
Date: Thu, 09 Mar 2023 15:57:48 -0800	[thread overview]
Message-ID: <87a60lmq9v.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230307201611.773103-10-umesh.nerlige.ramappa@intel.com>

On Tue, 07 Mar 2023 12:16:11 -0800, Umesh Nerlige Ramappa wrote:
>

Hi Umesh,

> -static int gen8_configure_context(struct i915_gem_context *ctx,
> +static int gen8_configure_context(struct i915_perf_stream *stream,
> +				  struct i915_gem_context *ctx,
>				  struct flex *flex, unsigned int count)
>  {
>	struct i915_gem_engines_iter it;
> @@ -2573,7 +2594,8 @@ static int gen8_configure_context(struct i915_gem_context *ctx,
>	for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
>		GEM_BUG_ON(ce == ce->engine->kernel_context);
>
> -		if (!engine_supports_oa(ce->engine))
> +		if (!engine_supports_oa(ce->engine) ||
> +		    ce->engine->class != stream->engine->class)
>			continue;
>
>		/* Otherwise OA settings will be set upon first use */
> @@ -2704,7 +2726,7 @@ oa_configure_all_contexts(struct i915_perf_stream *stream,
>
>		spin_unlock(&i915->gem.contexts.lock);
>
> -		err = gen8_configure_context(ctx, regs, num_regs);
> +		err = gen8_configure_context(stream, ctx, regs, num_regs);
>		if (err) {
>			i915_gem_context_put(ctx);
>			return err;
> @@ -2724,7 +2746,8 @@ oa_configure_all_contexts(struct i915_perf_stream *stream,
>	for_each_uabi_engine(engine, i915) {
>		struct intel_context *ce = engine->kernel_context;
>
> -		if (!engine_supports_oa(ce->engine))
> +		if (!engine_supports_oa(ce->engine) ||
> +		    ce->engine->class != stream->engine->class)
>			continue;
>
>		regs[0].value = intel_sseu_make_rpcs(engine->gt, &ce->sseu);
> @@ -2749,6 +2772,9 @@ gen12_configure_all_contexts(struct i915_perf_stream *stream,
>		},
>	};
>
> +	if (stream->engine->class != RENDER_CLASS)
> +		return 0;
> +
>	return oa_configure_all_contexts(stream,
>					 regs, ARRAY_SIZE(regs),
>					 active);

Can you please explain the above changes? Why are we checking for
engine->class above? Should we be checking for both class and instance? Or
all engines connected to an OA unit (multiple classes can be connected to
an OA unit and be different from stream->engine->class, e.g. VDBOX and
VEBOX)? oa_configure_all_contexts is also called from
lrc_configure_all_contexts.

Thanks.
--
Ashutosh

  reply	other threads:[~2023-03-09 23:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 20:16 [Intel-gfx] [PATCH v4 0/9] Add OAM support for MTL Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 1/9] drm/i915/perf: Drop wakeref on GuC RC error Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 2/9] drm/i915/perf: Add helper to check supported OA engines Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 3/9] drm/i915/perf: Validate OA sseu config outside switch Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 4/9] drm/i915/perf: Group engines into respective OA groups Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 5/9] drm/i915/perf: Fail modprobe if i915_perf_init fails on OOM Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 6/9] drm/i915/perf: Parse 64bit report header formats correctly Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 7/9] drm/i915/perf: Handle non-power-of-2 reports Umesh Nerlige Ramappa
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 8/9] drm/i915/perf: Add engine class instance parameters to perf Umesh Nerlige Ramappa
2023-03-08  1:45   ` Dixit, Ashutosh
2023-03-09 22:36     ` Umesh Nerlige Ramappa
2023-03-08 18:08   ` Dixit, Ashutosh
2023-03-09 22:34     ` Umesh Nerlige Ramappa
2023-03-10  0:24       ` Dixit, Ashutosh
2023-03-07 20:16 ` [Intel-gfx] [PATCH v4 9/9] drm/i915/perf: Add support for OA media units Umesh Nerlige Ramappa
2023-03-09 23:57   ` Dixit, Ashutosh [this message]
2023-03-10 16:39     ` Umesh Nerlige Ramappa
2023-03-10 17:36       ` Dixit, Ashutosh
2023-03-11  0:18         ` Umesh Nerlige Ramappa
2023-03-11  3:13           ` Dixit, Ashutosh
2023-03-14  9:13 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Add OAM support for MTL Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a60lmq9v.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.