Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jonathan Cavitt <jonathan.cavitt@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Use uabi engines for the default engine map
Date: Mon, 23 Jan 2023 11:46:06 +0000	[thread overview]
Message-ID: <a56bebbc-f149-d362-b6d0-4c30f1c19242@linux.intel.com> (raw)
In-Reply-To: <20230120191902.1301697-1-jonathan.cavitt@intel.com>


On 20/01/2023 19:19, Jonathan Cavitt wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Default engine map is exactly about uabi engines so no excuse not to use
> the appropriate iterator to populate it.

Okay I guess this was something I did as part of multi-tile enabling 
refactor some years ago, so even if it looks a bit head scratching on 
it's own it still has a purpose so IMO if someone r-b's it is okay to merge.

Jonathan even you could r-b, but you need to add your s-o-b in any case 
and re-send.

Regards,

Tvrtko

> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_context.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 454e73a433c8..42a39e103d7c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -1096,16 +1096,15 @@ static struct i915_gem_engines *alloc_engines(unsigned int count)
>   static struct i915_gem_engines *default_engines(struct i915_gem_context *ctx,
>   						struct intel_sseu rcs_sseu)
>   {
> -	const struct intel_gt *gt = to_gt(ctx->i915);
> +	const unsigned int max = I915_NUM_ENGINES;
>   	struct intel_engine_cs *engine;
>   	struct i915_gem_engines *e, *err;
> -	enum intel_engine_id id;
>   
> -	e = alloc_engines(I915_NUM_ENGINES);
> +	e = alloc_engines(max);
>   	if (!e)
>   		return ERR_PTR(-ENOMEM);
>   
> -	for_each_engine(engine, gt, id) {
> +	for_each_uabi_engine(engine, ctx->i915) {
>   		struct intel_context *ce;
>   		struct intel_sseu sseu = {};
>   		int ret;
> @@ -1113,7 +1112,7 @@ static struct i915_gem_engines *default_engines(struct i915_gem_context *ctx,
>   		if (engine->legacy_idx == INVALID_ENGINE)
>   			continue;
>   
> -		GEM_BUG_ON(engine->legacy_idx >= I915_NUM_ENGINES);
> +		GEM_BUG_ON(engine->legacy_idx >= max);
>   		GEM_BUG_ON(e->engines[engine->legacy_idx]);
>   
>   		ce = intel_context_create(engine);

  parent reply	other threads:[~2023-01-23 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 19:19 [Intel-gfx] [PATCH] drm/i915: Use uabi engines for the default engine map Jonathan Cavitt
2023-01-20 20:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use uabi engines for the default engine map (rev2) Patchwork
2023-01-21 20:41 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-01-23 11:46 ` Tvrtko Ursulin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-23 15:25 [Intel-gfx] [PATCH] drm/i915: Use uabi engines for the default engine map Jonathan Cavitt
2023-01-23 20:27 ` Cavitt, Jonathan
2023-01-23 18:56 Jonathan Cavitt
2023-01-24  9:54 ` Tvrtko Ursulin

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=a56bebbc-f149-d362-b6d0-4c30f1c19242@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jonathan.cavitt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox